How to create time dependent workflows in Bubble.io

Database Aug 14, 2020

If you want to restrict certain workflows to run only based on the user's time, you can use conditional statements. For example, a user should be able to add new products to their store only between 8 am to 8 pm. Or a user should be able to change the product prices only between 10 am to 12 pm.

Setting up the workflow

Let's say you have a button which triggers the workflow that you want to restrict. I've created 3 buttons which will run only when my time is within the time period mentioned in the buttons.

In the workflows, I've added conditional statements.

With this statement, I am extracting the hour component of current user's date and time and using it to restrict the workflow between 12 am (0000 hrs) and 6 am (0600 hrs). You can similarly extract the day, minute, second or any other component of the date and time.

Preview - https://nocodeassistant-tutorials.bubbleapps.io/version-test/time_dependent_workflows

Editor - https://bubble.io/page?type=page&name=time_dependent_workflows&id=nocodeassistant-tutorials&tab=tabs-1


You can use the :extract function in a variety of different situations and I've only used for one particular use case. If you need some help with your Bubble app, you can find me on Twitter or email me at [email protected]

Tags