Trying to create a queue schedule

i am trying to make a queue to sent email for subscriber of my app
i want to use backend workflow and there is a job that will automatically run after every 15 minutes and get the list of subscriber based on some data base condition and then email trigger for every record

You can create a schedule API on your backend, to create or recreate a list and then send an email eg, however it must have a trigger.

If you give me more details I can help you more properly

1 Like

Let me Explain you

i have a table where i am saving trail periods of user
now i want list of those user who’s trial period going to end in one day
and want to send them email for every user to update there payment method

Go it ! So what you can make is, create in the Backend an schedule API which will run “X” time after the registration, if the user hasn’t updated their payment method yet. This Action you will put on the registration workflow, so every time someone register on your app, and if after the trial period the payment method is not uptdated, Bubble will send an email.

Yup ,
This is a good idea but i want a schedule job to run automatically on list of subscriber
is that possible ?

Yes it is possible, you can create a new data type, eg. “List of Subscribers” with a field “List of Users”, and then on the workflow of the registration you add a action which will add the user to that list, remove it when he pays the subscription (this would be on the payment workflow), or even add it again when you can’t charge again the CC and the user gets in default.

There is a lot of options you can explore and develop, depending on your app’s needs.

Then you can create an API which will run “X” time, and use that list that you previous created ! For the first time you can add on your app an provisory button for the trigger, and after the first click you can delete, it is just to start the workflow.

Nice ,
but there is no any other method rather then trigger by clicking?

I want to do this in backend workflow
Steps should be

  • Workflow should automatically run hourly

  • Then step 1 will be to fetch the record based on condition

  • Then step 2 will sent email for every record

is this possible?

You always need a trigger !

But you only need to trigger one time, the workflow will run on the backend, it’s just to start the workflow. You click it on the live mode, it will run automatically, as I said, you can delete it after, or just hide it on a hidden pop up for this kind of matters !

Why running hourly? Considering the performance of your app, one time per day wouldn’t be enough?

As on the list are only the users in default, you just need to create an action to send the email (I use sendgrid), and then the “address emails” just indicate that it is that list.

Remember that the list is updated during the registration process, and during the charge action.

I believe this is the best approach to implement the best automation on your project !

Thanks for your support :innocent:,

1 Like

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