How to trigger workflow on page load 'just once'


I have a plugin that requires a workflow to be ran in order to enable it.

The issue is that once the plugin is enabled, it will start to trip out and break itself if you try to enable it again while it’s already enabled.

This is a huge issue as I have a Single Page App, and “go to same page” workflows are my lifeblood.

I’ve tried to set conditionals such as only when page loaded entire along with do when condition is true (just once) and though I’ve seen improved performance, it’s still too glitchy for my liking.

If I tie the workflow to a simple button press, that solves everything, however, as the plugin is a background, it feels like it would be pretty weird to ask users to tap a button that will enable their background.

Hi there Perfect,

My initial thought would be to Do when page is loaded and Custom state is X.
Have a custom state, that on default is X so that the workflow runs.
In that same workflow, make it your last step to change the custom state from X to Z so that the workflow doesn’t run anymore when the page is loaded again.

Hope this helps!

While the preceding suggestion is correct (once plugin is initialized, don’t let that happen again), what plugin are you talking about?

Stars. It’s a really cool background plugin that’s made my landing page at look so much cooler

VisionCode | Stars

If it’s just a plugin running some css thing there’s no reason to interact with it at all. Just don’t do whatever it is that you’re doing.

Plugin required me to enable it via workflow in order for it to start running

I opted to use the on-page-load workflow as that’s the easiest way to set up states // automated things.

Since the app is a single page shell, every single one of my on-page-load workflows technically run every single time I switch page.

You can’t tell though because generally the states // content of the plugins are already loaded in.

This is the first plugin I’ve used that had issues with the single page framework // workflows

@thekeybeats2’s solution of custom states winded up working, so I suppose all is well