API / Backend workflows

I’m trying to do two things with backend workflows, but need some guidance:

  1. At a regular interval (every 5 minutes), perform a calculation for each thing of a certain data type (update ranking value of each thing).

  2. Schedule push notifications at regular intervals (i.e., look at notification database, send any unseen notifications as push).

Any recommendations?

Hey @cdowless!

Have you seen the section in our manual on recursive scheduled workflows? I think this might be the direction you’d want to head with this. The general idea is that you’d create a backend workflow that reschedules itself to current date/time +minutes x. Keep in mind that depending on the number of things in this database, that could become relatively heavy on your app’s capacity.

Another approach, depending on what you’re trying to accomplish would be a database change trigger where you update the ranking of a thing automatically anytime something else about the thing is updated.

The approach would be similar for push notifications. You could create a backend workflow that reschedules itself. Each run might have a single action that schedules a backend workflow on a list (that list being any unseen notifications) and then a final action that reschedules itself for the next round using a similar approach to above.

Feel free to reach out to Support@bubble.io with any questions!

Ah - yes! This is what I was looking for. Thanks for the pointer!

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