Sendgrid email sender first name substituion

Hi there, I'm just trying to implement a first_name substitution tag in an email body I'm sending via the retool sendgrid email sender app.
I have read the sendgrid docs, and I think i am on the right path...

but obviously not quite there yet, as I am not 100% on the retool side of things. Any pointers are of course welcome :slight_smile:
Thank you

Hey! Welcome to the forum! Can you please add a tad more context to what you're trying to achieve?

What is failing, and what are you trying to achieve :-)?

Hello Jonathan, thank you so much for responding. I am trying to acheive a first_name tag in the sendgrid email sender app email body.
The sendgrid docs (Substitution and Section Tags | Twilio) (v3 api) state the way to go about that is to include a "substitution" within the sendgrid query.

Thus far, I can retreive the value of a first_name from my usersTable successfully, but simply using -first_name- tag in email doesn't transform that into a first name in the received email.

At the bottom of the page in the retool tutorial of creating the email sender app (which is excellent by the way :wink: ) there is a suggestion to keep a look out on the blog to find out how to "Templatize your emails with the first names of your recipients". Which is exactly what I am trying to do.

Hi @webm4ster! The blog post has a tutorial for iterating through a list and passing in dynamic values to sendgrid (https://retool.com/blog/building-an-email-sender-app-with-retool-and-sendgrid/)
Is that what you're looking to do?

Hi Tess, Thank you for responding. I have the sendgrid emailer app set up and working, I'm just looking to dynamically add a first name of the recipents to the emai body.

Many Thanks
Thomas

Hi there,

Are you using a Sendgrid template? If so, it looks like you can add a dynamic variable to the template on the Sendgrid side (ex. {{name}}):

Then, in the Retool request, you can input a dynamic value for the variable (I've named my template variable name:

Let me know if this helps!

That's exactly what I was looking for. Thank you so much for responding - you guys are awesome :slight_smile: :champagne:

1 Like