Set store status to open/closed when user offline


Is it possible for a workflow to run by comparing Current time with a store’s opening hours while the store’s Creator is offline?

I’ve successfully managed to set the store’s status to Open and Closed when the user is online but that’s not really what I’m aiming for since the User won’t be online most of the time.

Basically what I need is a text value that displays either “Open” or “Closed” and a boolean to switch between yes/no, both based on the store’s opening hours. Is this achievable?


Btw scheduled workflows is not an option for me as I’m on a personal plan.

Does the user set the opening hours in advance? Are they just fields on the Store thing? Or does the user have to be online for the store to be open?

What does this workflow do? If it’s just setting text you don’t need a workflow - you can just use conditionals on the UI element to display the status.

If you need to run some stuff in the background - you might be able to set up a recursive workflow (search for it on the forum)

Yes he sets them up when listing his store.

It’s not just a list of fields in the Store thing. Each store contains a list of up to 7 Availabilities (one per day), so:

User creates thing Store, including type opening_hours, which is a list of Availibilities (screenshot below shows where those availabilities are set).

User does not have to be online for the store to be open. It’s opening hours should define whether it’s open or closed.

The workflow should change two types: ifOpen (yes/no) and storeVisibility (text). Since I’m using Bubble as a backend I need to run this workflow in the background, but not based on a specific user’s action; rather on the set opening hours.

I’ve seen and tried recursive workflows but couldn’t figure out how to use it in my case. Could you maybe help me in the right direction?

@renzetc this approach is a bit tricky i think - keep in mind that a solution like this won’t work across timezones either.

What are you using as the frontend?

Normally you would just send over the 7 timestamps / ranges and do a comparison with the current time in the frontend. That’s how you know if the store is open or not without fancy background processing happening.

Thanks for your response Kayami! I’m using Adalo as a frontend.

Right now I’m trying a recursive workflow that triggers exactly 7 days after the opening/closing hour and then reschedules itself for the week after. Not sure if this works in the long run or if it works at all but we’ll see.