Recurring backend workflow based on user sign up anniversary

Hey all, I’m trying to reset a credit allowance for users every 30 days from the date they sign up. Anyone know how to do this?

I’m thinking it makes sense to either:

  • Trigger a backend workflow for action to reset a user’s credits if today is the monthly anniversary of their sign up

or

  • Trigger a daily backend workflow on the whole db but it only resets credits for users if today is the monthly anniversary of their sign up

Any help would be much appreciated!

Hi there, @buildingsomething… if I was doing what you described, I would include an action in the sign up workflow that schedules a backend workflow to run 30 days after the sign up to reset the credit allowance. Then, have the backend workflow schedule itself to run 30 days later, and you should be good to go.

Hope this helps.

Best…
Mike

Nice approach, I like the simplicity of it! Not sure I like doing it on the user level as I can’t cancel the next one easily but could do a daily backend trigger that schedules the next day’s one.

I’m also looking into the recurring event backend workflow, but can’t find any decent description of it. The official support page just says the line below which isn’t very helpful!

Recurring event
This event is defined in the API section of the app and runs recurring actions on a thing.

For what it’s worth, I wouldn’t use a recurring event. With regard to canceling the next one, that can easily be done by saving it somewhere (likely on the User data type) when it’s scheduled, and if it needs to be canceled for some reason, you can reference it from the saved location. I do that in one of my apps, and it works like a charm.

I like @mikeloc solution. My question is how much would a scheduled workflow that is scheduled after 30 days multiplied by the number of users have an effect on the WU consumption of the current Bubble pricing model?
Isn’t it better to check your app’s WU consumption via the Logs tab to find out the least busy time and set a workflow to run daily on that time to search the Users to check if today is their 30 days cycle and reset their credit?
What do you think about it?

This topic was automatically closed after 70 days. New replies are no longer allowed.