Questions tagged [sendgrid-templates]

Questions related to SendGrid's templating engine, it's usage, API, etc. Also includes transactional templates.

155 questions
12
votes
4 answers

Is there a way to use SendGrid Template Versioning with different development life-cycle environments?

Versioning in SendGrid allows API clients to make template requests only by template ID documented here, however, only one version of a template can be "Active" at a time. Obviously, the template used for our production applications needs to always…
CodeKiller
  • 375
  • 4
  • 12
10
votes
1 answer

How to add CC to SendGrid mail using C#

This is my code.. var client = new SendGridClient(SendGridEmailEntity.Key); var from = new EmailAddress(SendGridEmailEntity.Mail, SendGridEmailEntity.DisplayName); var subject = templateRecord.EmailFrm.SubjectName; var to = new…
Tejas
  • 296
  • 3
  • 12
9
votes
2 answers

Is there a way to retrieve the generated HTML email body of a dynamic template via SendGrid API call?

We have a site where our agents enter in some data, and then that data is sent to a client, via a SendGrid dynamic template. The email content includes a lot of calculations based on the data entered, so we want our agents to have the ability to…
daybreaker
  • 1,320
  • 1
  • 10
  • 17
9
votes
2 answers

Warning while sending template email via sendgrid with '&'

I'm sending an email with help of the sendgrid api v3 but got the warning/error: Content with characters ', " or & may need to be escaped with three brackets {{{ content }}} in my api json i'm adding an link containing the &…
andre_hold
  • 562
  • 8
  • 20
9
votes
2 answers

Encoding for special characters not working in email subject for sendgrid templates

I have been using the sendgrid-ruby gem for sending emails. The subject of the email doesn't decode special characters properly. Eg. Sending this subject for the email How's it going translates to this in the actual email How's it going I have…
9
votes
2 answers

In Sendgrid Design template, how to use handlebar iteration for table?

I'm using SendGrid online "Design" template, with a module "code". In their documentation (https://sendgrid.com/docs/ui/sending-email/editor/#code-modules), they say that de code editor does not modify or validate any HTML. If I write this piece of…
rekam
  • 1,061
  • 3
  • 13
  • 31
9
votes
5 answers

Sendgrid: use template versions to support multiple languages

I want to utilize Sendgrid template versions to support multiple language support. According to Sendgrid documentation: A template can only have one active version at a time. If you’ve created a new version with different HTML that you want your…
Hutsul
  • 1,535
  • 4
  • 31
  • 51
9
votes
3 answers

Can I have an image with a substitution tag in a SendGrid template?

I am creating a template in SendGrid and I was trying to put an image in the center, and the URL I would like to be a tag so I can substitute dynamically in my code, because it will come from my database. I tried to simply place a tag in the input…
denyzprahy
  • 820
  • 11
  • 24
7
votes
1 answer

How to insert dynamic data (HTML) into SendGrid Templates in JavaScript

I wish to send an email using a SendGrid template. I use the standard v3 api and a simple axios call. I wish to send an email using a Template. The mail should contain a number of rows and columns. I do not know how many rows/column there will be…
Kermit
  • 2,865
  • 3
  • 30
  • 53
6
votes
1 answer

How to allow html in template data for dynamic Sendgrid transactional template?

Maybe I'm not seeing the obvious here. I'm using this library for sending mails. And I'm also using transactional templates. A quick code example: var msg = new SendGridMessage {From = new EmailAddress("my@email.com")}; var personlization = new…
user1447679
  • 3,076
  • 7
  • 32
  • 69
6
votes
1 answer

dynamic_template_data doesn't work with sendgrid and azure function integration

Trying to use transactional template with azure function sendgrid integration (javaScript) , I'm sending the following object (removed email address etc.): const message = { "personalizations":[ { "to":[ { …
Rotem Slootzky
  • 688
  • 10
  • 21
6
votes
0 answers

Sendgrid transactional mail templates strips href attributes as substitutions

I'm trying to use a Sendgrid transactional template to send informational emails like account validation etc, using the sendgrid node client. I created one main transactional template which should have a button that has a dynamic body text and a…
Fabian Tjoe A On
  • 1,383
  • 5
  • 18
  • 41
5
votes
3 answers

Sendgrid - handlebar error msg in dynamic template

I have tried to setup a Sendgrid dynamic template that contains several handlebars, including an Iterator with each The whole email template html can be found her The test data looks like this: { "total":"1000", "items":[ { …
Fjott
  • 1,107
  • 3
  • 15
  • 38
5
votes
1 answer

Sendgrid API v3 Send a campaign with a template and dynamic template data

I'm using Sendgrid's new API (v3) with Node js + libraries @sendgrid/mail and @sendgrid/client. What I want to achieve: send a weekly digest to all my contacts (except those who unsubscribe from this group). I use a template I created via Sendgrid…
Marie Dm
  • 2,637
  • 3
  • 24
  • 43
5
votes
2 answers

Variable within Sendgrid subject with dynamic_template_variable_data doesn't work

I'm trying to insert a dynamical variable into the subject line via this library. For example: "Hello {{name}}, welcome to {{store_name}}" My email sends off no problem, but the subject renders {{name}} and {{store_name}} as... just that. No…
Pat
  • 225
  • 3
  • 11
1
2 3
10 11