I currently have an event that makes changes to current user. It currently runs after page load. However, I want to add a 5-10 second delay after the page loads.
How could I do this?
P.S. Bubble has a feature “add pause before next action” but that only delays front-end things like popups. It doesnt delay changes to the database.
I figured it out. This is how I did it. This works if you’re trying to add a time delay on anything that runs in the back-end (database entries, API’s, etc). My goal in here was to ask to make a change to the current user 10 seconds after the page had finished loading. I create this time delay by changing a custom event’s value 10 seconds after page load. I then have another workflow that only runs if the custom event changes.
Go to the page and set a custom state to the page. In my case, I gave my home page a custom state called “asklocation”. Make the custom state of type yes/no. Make default value = no (false)
Add the following workflow: When this page is loaded --> Add a pause before next action --> set custom state: element = homepage; custom state = asklocation; value = yes
Now create another workflow. It goes like this: Do when condition is true: this page’s “asklocation” = yes --> make changes to current user or create a new thing. here’s where you insert the event you want delayed.