# Sending Bubble emails using a SendGrid Template

**URL:** <https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187>\
**Category:** Plugins\
**Created:** [April 6, 2020, 5:47pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187 "2020-04-06T17:47:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tristan.adlington](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tristan.adlington/32/51336_2.png) [@tristan.adlington](https://forum.bubble.io/u/tristan.adlington)\
**Post date:** [April 6, 2020, 5:47pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/1 "2020-04-06T17:47:03Z")

</div>

I am trying to make my transactional emails pretty (emails created using ‘send email’ action in workflows)

I have created a dynamic template in SendGrid and added this number in the ‘Template ID’ field in Bubble’s Email Settings.

However, while Bubble is succesfully using the template in SendGrid, there is no data in it - no subject and no body. How do I add this to the template in SendGrid, I presume it is some kind of shortcode?

---

<div class="post-metadata">

**Author:** ![mangooly](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mangooly/32/40770_2.png) [@mangooly](https://forum.bubble.io/u/mangooly)\
**Post date:** [April 13, 2020, 12:05pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/2 "2020-04-13T12:05:38Z")

</div>

Hi @tristan.adlington

Did you work out how to do this?

Thanks

---

<div class="post-metadata">

**Author:** ![tristan.adlington](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tristan.adlington/32/51336_2.png) [@tristan.adlington](https://forum.bubble.io/u/tristan.adlington)\
**Post date:** [April 13, 2020, 1:48pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/3 "2020-04-13T13:48:43Z")

</div>

I haven’t unfortunately - have you?

I imagine it is very simple - add some kind of tag for subject and body to the template in SendGrid.

---

<div class="post-metadata">

**Author:** ![mangooly](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mangooly/32/40770_2.png) [@mangooly](https://forum.bubble.io/u/mangooly)\
**Post date:** [April 14, 2020, 1:27pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/4 "2020-04-14T13:27:35Z")

</div>

No, for the moment I am using the rich text editor to create emails the best I can.

---

<div class="post-metadata">

**Author:** ![ferhatgulbahar](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ferhatgulbahar/32/123920_2.png) [@ferhatgulbahar](https://forum.bubble.io/u/ferhatgulbahar)\
**Post date:** [April 14, 2020, 4:28pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/5 "2020-04-14T16:28:44Z")

</div>

You are supposed to use Send email (custom) action to send data with JSON.  
 ![Capture](https://us1.discourse-cdn.com/bubble/original/3X/5/c/5cd3cab25310bef49c4129938f9c4a5d5e1b3d64.png)

You select Dynamic for type and paste your Template ID from the sengrid.

 ![Capture1](https://us1.discourse-cdn.com/bubble/original/3X/8/b/8b11a8e18c6c87b31cfc3208e9dab1ef75ad5f0a.png)

Then in the custom\_data box, you can feed dynamic app data to the email template by using [JSON](https://www.w3schools.com/js/js_json_syntax.asp).

 ![Capture2](https://us1.discourse-cdn.com/bubble/original/3X/3/e/3ee65549a23e11ded68c7b0e98a67eaa0795ac06.png)

Then in your Sendgrid template, make sure to have {{subject}} in your Subject line, so that the subject data comes from your sendgrid custom email action.

 ![Capture3](https://us1.discourse-cdn.com/bubble/original/3X/a/d/ad6fc88b865395ac985b73aad20de6c1e244bdc5.png)

As you can see, in the email template itself, I used {{name}} to pull the right data to the right place.  
 ![Capture4](https://us1.discourse-cdn.com/bubble/original/3X/8/0/80574fddfba1c6a4c530623dbf0e143a7272096b.png)

I hope this helps.

---

<div class="post-metadata">

**Author:** ![copilot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/copilot/32/32859_2.png) [@copilot](https://forum.bubble.io/u/copilot)\
**Post date:** [April 14, 2020, 9:32pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/6 "2020-04-14T21:32:40Z")

</div>

As a quick note, @ferhatgulbahar (great walkthrough!) is using the SendGrid plugin as opposed to Bubble’s built-in email actions. You’ll have to decide which option works best for your use case! 🙂

---

<div class="post-metadata">

**Author:** ![mangooly](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mangooly/32/40770_2.png) [@mangooly](https://forum.bubble.io/u/mangooly)\
**Post date:** [April 17, 2020, 8:44am UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/7 "2020-04-17T08:44:30Z")

</div>

Thanks a lot @ferhatgulbahar. Yes it definitely helps a lot. I will definetly upgrade at some point to using Sendgrid templates, but before I do I have a question…

@copilot, from your remarks, do you also mean than we can use json with the Bubble built-in email actions or are these the limitations that exist with using this option?

Thanks

---

<div class="post-metadata">

**Author:** ![copilot](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/copilot/32/32859_2.png) [@copilot](https://forum.bubble.io/u/copilot)\
**Post date:** [April 17, 2020, 2:10pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/8 "2020-04-17T14:10:05Z")

</div>

Hey @mangooly,

We created the SendGrid plugin to get around some of the limitations with Bubble’s option. 🙂

---

<div class="post-metadata">

**Author:** ![chaostorm](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/chaostorm/32/127792_2.png) [@chaostorm](https://forum.bubble.io/u/chaostorm)\
**Post date:** [June 2, 2020, 12:51am UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/9 "2020-06-02T00:51:25Z")

</div>

@ferhatgulbahar How can one set up a SendGrid template to be used in Bubble’s automatic transactional emails such as password resets and such?

I’ve created a new template in SendGrid, entered its ID in Bubble in Settings \> Domain / email \> Email settings \> Template ID, and verified the API key.

However, no matter where I add `<%body%>` in the template (as per Bubble’s documentation), dynamic content of the email never displays when an email is sent, only static stuff like the logo image I put in there.

---

<div class="post-metadata">

**Author:** ![SerPounce](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/serpounce/32/62068_2.png) [@SerPounce](https://forum.bubble.io/u/SerPounce)\
**Post date:** [June 2, 2020, 7:08pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/10 "2020-06-02T19:08:27Z")

</div>

Are you using a dynamic template within SendGrid?

---

<div class="post-metadata">

**Author:** ![chaostorm](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/chaostorm/32/127792_2.png) [@chaostorm](https://forum.bubble.io/u/chaostorm)\
**Post date:** [June 2, 2020, 7:20pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/11 "2020-06-02T19:20:48Z")

</div>

@SerPounce I am. I can get a Legacy template to work as a catch-all template, but not a Dynamic one. Do you know how to do it?

---

<div class="post-metadata">

**Author:** ![SerPounce](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/serpounce/32/62068_2.png) [@SerPounce](https://forum.bubble.io/u/SerPounce)\
**Post date:** [June 2, 2020, 7:27pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/12 "2020-06-02T19:27:33Z")

</div>

I spent the entire day yesterday going through this and pulling my non-existent hair out. In the end, I was causing my own troubles as I was using a bunch of out of date forum posts and tutorials. At the end, I followed this and it worked first time:

[![](https://img.youtube.com/vi/zOp2uwW89YE/maxresdefault.jpg "UPDATED: How to Use SendGrid in Your Bubble.io No Code Web Apps") ](https://www.youtube.com/watch?v=zOp2uwW89YE&t=788s)

The way to know that this is the current version is reference to these keys or substitution tags. The outdated posts refer to all manner of obsolete stuff that is such a rabbit hole. That should all be sunset.

 ![Screen Shot 2020-06-02 at 3.24.57 PM](https://us1.discourse-cdn.com/bubble/original/3X/3/5/357432ac73573267560012f31a7c8a13d5beebe3.png)

---

<div class="post-metadata">

**Author:** ![jason.thomas89](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jason.thomas89](https://forum.bubble.io/u/jason.thomas89)\
**Post date:** [February 2, 2021, 2:00am UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/13 "2021-02-02T02:00:08Z")

</div>

There’s no need to use a plugin if you use legacy templates on Sendgrid. This should help:

[[Beginners Guide] to Sending Emails With Sendgrid - Work in Progress! - Tips - Bubble Forum](http://forum.bubble.io/t/beginners-guide-to-sending-emails-with-sendgrid-work-in-progress/48860)

When you create a new template a default body HTML tag will appear on the page. Build your template around this and don’t delete. Save.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/4/9/493f3a396984f0b67c39b60be7e1972b354dc671.png)

Then add the template ID in to Bubble’s settings. The body configured in the workflow will appear where the html tag is in the email template.

---

<div class="post-metadata">

**Author:** ![will\_ericksson](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/will_ericksson/32/73131_2.png) [@will\_ericksson](https://forum.bubble.io/u/will_ericksson)\
**Post date:** [March 31, 2021, 11:10am UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/14 "2021-03-31T11:10:55Z")

</div>

@jason.thomas89 and others…  
Do you mean that Bubble’s inbuilt Send Email action only works with Legacy Templates in Sendgrid?

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [April 2, 2021, 3:09am UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/15 "2021-04-02T03:09:51Z")

</div>

Hey @will_ericksson,

This is true, if you want anything with the new version of email templates you’ll need to use the @copilot Sendgrid plugin or setup a connection on the API connector.

---

<div class="post-metadata">

**Author:** ![will\_ericksson](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/will_ericksson/32/73131_2.png) [@will\_ericksson](https://forum.bubble.io/u/will_ericksson)\
**Post date:** [April 2, 2021, 8:19am UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/16 "2021-04-02T08:19:44Z")

</div>

@johnny thanks for verifying.

---

<div class="post-metadata">

**Author:** ![darren.james7518](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@darren.james7518](https://forum.bubble.io/u/darren.james7518)\
**Post date:** [November 24, 2021, 5:24pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/17 "2021-11-24T17:24:01Z")

</div>

> [@jason.thomas89](#):
>
> Then add the template ID in to Bubble’s settings

What do we do if we wasn’t to have more than one template? Bubble only has space for one template ID

---

<div class="post-metadata">

**Author:** ![johnny](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnny/32/203020_2.png) [@johnny](https://forum.bubble.io/u/johnny)\
**Post date:** [November 24, 2021, 5:48pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/18 "2021-11-24T17:48:30Z")

</div>

Hey there @darren.james7518,

I’d use the Sendgrid CoPilot plugin. But in all honestly I wouldn’t even use Sendgrid considering their terrible delivery rate.

---

<div class="post-metadata">

**Author:** ![darren.james7518](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@darren.james7518](https://forum.bubble.io/u/darren.james7518)\
**Post date:** [November 24, 2021, 6:04pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/19 "2021-11-24T18:04:52Z")

</div>

> [@chaostorm](#):
>
> \<%body%\>

hmmm, I must admit Sendgrid is annoying. Or maybe it’s Bubblle which is the issue? I always get this error, even when my Subject is plain text. My tests work, meaning Sendgrid is sending emails and they are arriving, but when I set up a button in Bubble to send email I get the same error.

![error](https://us1.discourse-cdn.com/bubble/original/3X/7/f/7fa210f018a5d353f2ed5e556d8407d68ee92c57.png)

---

<div class="post-metadata">

**Author:** ![chaostorm](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/chaostorm/32/127792_2.png) [@chaostorm](https://forum.bubble.io/u/chaostorm)\
**Post date:** [November 24, 2021, 6:33pm UTC](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187/20 "2021-11-24T18:33:57Z")

</div>

@darren.james7518 I ended up ditching Legacy Templates and exclusively using Dynamic Templates in all new projects, powered by @copilot’s excellent [SendGrid plugin](https://bubble.io/plugin/sendgrid-1484327506287x474510747987607550). I can’t recommend it enough.

[Next page](https://forum.bubble.io/t/sending-bubble-emails-using-a-sendgrid-template/85187.md?page=2)
