Forum Academy Marketplace Showcase Pricing Features

Stuck on the logic and database management

Thanks to anyone who can help with this — I need help with the logic and database management.

My app has a series of continually updating “actions for good” (signing petitions, emailing politicians etc.) that users are presented with on the index page in an RG. If they choose to do an action, they click “I’ll do it”, and they’re taking to an external website to complete the digital action.

I would like an email to be automatically sent 60 minutes after the “I’ll do it” button is pressed.

Where in the database should I save the ID of the action, the ID of the user, and the timestamp when they clicked the button?

After that, how (and where) should I set up the automated email? (I have an admin page that I am prepared to have running permanently if this is necessary).

Thanks so much for your help!

Hi there, @small.change.me… if I understand your post correctly, you don’t necessarily need to save anything in order to accomplish what you have described.

You could set up a backend (API) workflow that takes a user and an action as its parameters, and there would be one step within that workflow that sends the email. Then, when the “I’ll do it” button is clicked, you schedule the backend workflow to run at the current date/time plus 60 minutes, and you send the current user and the current cell’s action as the parameters.

The above being said, if you want to track the button clicks, then I would likely set up a new data type, and I would create a new thing in that data type when the button is clicked. The only field you would need to set is the associated action because the newly-created thing would have a creation date/time and it would be created by the current user.

Hope this helps.

Best…
Mike

Hi Mike

Thanks for this. It sounds like the best solution, but I’m very new to all this.

What service would you recommend, and do you know any videos/guides that could help me set something like this up?

Thanks!

James

Well, if it was me, I would just use Bubble’s send email action (which uses Sendgrid, I believe), but I’m sure most folks would use their own service. I don’t have any experience with any of those services because I have never worked on an app that sends emails in bulk, but Sendgrid and Postmark are the two that are talked about most often, and there is even a thread about how awesome Postmark is.

If you just want to get something working with Bubble’s built-in email action, we could literally set up what I described in minutes (assuming you are on a paid plan, of course). Feel free to hit me up if you’d like some help.

Hi Mike — some help with that would be great, thank you! Yes, I’m on the paid plan. When would you have some free time? And happy new year by the way!

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