Sending Custom Emails (similar to twitter, or other user specific emails)

Hi Everyone,

I am looking to send emails to users showing all of the new posts the people they follow had in the last week. I have a page showing this information and would like to embed it into an email. Is there a way to embed the html from a page into an email for each user, and send on a weekly basis?

Some examples of this are when Facebook sends you an email with all of the recent posts your friends have had, or when Asana sends each user an email with their outstanding tasks.

I am not sure if this is possible with bubble. Any help would be greatly appreciated

You can do this with any email API service that offers a ‘templates’ functionality. The one I know best is Sendgrid’s dynamic templates.

In this case you set up the template on Sendgrid and assign the dynamic data that it should expect.
Then you set up the Sendgrid email send API in you API connector and make the API call with a JSON containing the dynamic data each time you want to send the email.
Based on this data it will populate the email and automatically send to the corresponding users.

https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates


Ranjit from Atomic Fusion

Explore and reuse the community’s Bubble assets | Accelerate your Bubble development with Atomic Fusion

Hi Ranjit,

I am looking to send a repeating group of information.

The repeating list is showing all of the posts of the people that they follow. I have not been able to find a implementation that works for getting a repeating group into an email

That’s possible as well

You can define an iteration in your Sendgrid dynamic template and then send a JSON array of data in your API call.

Here’s how you can dynamically build JSON arrays from a list of things in Bubble: How To Add A JSON Key To Bubble JSON Text Objects? - #2 by atomicfusion

Here are some examples of how it works:
https://docs.sendgrid.com/for-developers/sending-email/using-handlebars#iterations

Again, I’m sure this is also possible with other email APIs - Sendgrid is just what I’ve used the most!

Hope it helps :slight_smile:

1 Like