Skip to main content

Hello all,

 

I am trying to trigger an email from sendgrid off the back of a google sheet. When trying to do this, I keep getting an error message to do with the unsubscribe and manage preferences links in the HTML. I can set it live, but links don’t work when I send it. I have tried simply writing out what it should be ({{{unsubscribe}}} and {{{unsubscribe_preferences}}}) but keep getting the same error. 

 

Does anybody know how to get around this?

 

 

Hi @MKGTravelNest 

Good question.

What is the encountered error? (screenshot)


Hi @Troy Tessalone , there’s no such error message as such. Simply shows what’s in the screenshot above. When I send these with the error left then the links don’t work in the emails.


@MKGTravelNest 

You can try hardcoding the desired links.

 

This indicates the mapped variable is invalid as it’s not from a previous Zap step.

 

 


@Troy Tessalone tried doing that but it then automatically switches back to this when I run a test. Pretty sure this is a bug with the Sendgrid integration. Or it might be that zapier only allows transactional emails to be sent via sendgrid that don’t contain unsubscribe links.


@MKGTravelNest 

We would need to see updated screenshots with how your SendGrid Zap step is configured with the hardcoded links for unsub.

Would be helpful to see a received emails as well to see how it renders for those links.


Did this ever get resolved? - Same issue here


@Ben8989 and @MKGTravelNest 

Here’s the issue:

Zapier uses the double bracket syntax for variables:

{{variable}}

 

SendGrid uses the tripe bracket syntax for variables:

{{{unsubscribe}}}

 

So the issue is when you include the SendGrid variable syntax, Zapier interprets the inner double brackets as a variable and converts it.

Then when the Zap action step runs, no value is passed, because the mapped variable is invalid.

This breaks what SendGrid expects to receive, which is the triple bracketed variable.

 

 


@Ben8989and @MKGTravelNest 

Here’s the issue:

Zapier uses the double bracket syntax for variables:

{{variable}}

 

SendGrid uses the tripe bracket syntax for variables:

{{{unsubscribe}}}

 

So the issue is when you include the SendGrid variable syntax, Zapier interprets the inner double brackets as a variable and converts it.

Then when the Zap action step runs, no value is passed, because the mapped variable is invalid.

This breaks what SendGrid expects to receive, which is the triple bracketed variable.

 

 

 

Hi, I have attempted to do this with 1, 2 and 3 brackets and the same thing happens each time. It does not seem to recognize the field 


@Ben8989

2 and 3 brackets will cause issues.


Is there any solution to passing the unsubscribe variable to Sendgrid? 


I am having the same issue. the {{{unsubscribe}}} and {{weblink}} variables in my HTML are being stripped out by Zapier and they do not work when my email gets sent through SendGrid. Has anyone found a workaround for this issue?


@jcervantes 

Try setting those in the SendGrid template itself?


@jcervantes

Try setting those in the SendGrid template itself?

I’m not following what you mean. The HTML was designed in Stripo and I am using the {{{unsubscribe}}} and {{weblink}} variables. I export the HTML from Stripo and put it into the Zap using the SendGrid integration. However when Zapier runs the zap and passes that HTML to SendGrid it is removing the variables so SendGrid is not substituting in the correct link.


Hi @MKGTravelNest@Ben8989 and @jcervantes👋

Sorry to hear of the troubles here! I’ve just been doing some digging and came across this help guide on the SendGrid website which references a different way to output those tags using <% and %> instead of {{{ and }}}. 
c2ca70268479170cd373f582ce3e4431.png
As it doesn’t involve using those {{{ }}} brackets I’m hoping that will help to get around the issue. 🤞

Can you try adding those to the relevant <a href> tags and see if that does the trick?


Hi @MKGTravelNest@Ben8989 and @jcervantes👋

Sorry to hear of the troubles here! I’ve just been doing some digging and came across this help guide on the SendGrid website which references a different way to output those tags using <% and %> instead of {{{ and }}}. 
c2ca70268479170cd373f582ce3e4431.png
As it doesn’t involve using those {{{ }}} brackets I’m hoping that will help to get around the issue. 🤞

Can you try adding those to the relevant <a href> tags and see if that does the trick?

 

Thanks for looking into this for me. I also came across this page and tried using those instead of the {{{unsubscribe}}} but they do not work. I think those are designed to be used with their API and not just placed in the HTML like the handlebar variable is. 


Apologies for the delay in a response here, @jcervantes!

I’m so sorry those other tags didn’t work as hoped. Hmm, in that case it may be best to reach out to our Support team to investigate further as this may be the result of a bug. In which case they’ll be able to get a bug report opened for this issue so the app’s developers can get it sorted.

Please do keep us in the loop on how you get on with them. Would love to know if you’re able to find a workaround or temporary solution in the meantime! 🙂


Any solution to this? 


Hi @Mikee999! 👋

I took a look and it looks as though Support have added @jcervantes to a feature request to allow Email Templates to be used when using SendGrid’s Send Email action. Which in would allow you to use variables (though likely not including the “{{“ “}}” curly brackets) in your SendGrid Zaps. 

I’ve gone ahead and added votes for everyone here that has expressed an interest in using those variables. I can’t provide an ETA on when or if it will definitely be implemented but we’ll be sure to notify you all as soon as it is!


I found a solution :-)

1) Replacing {{{unsubscribe}}} with tunsubscribe] in the code.
2) Enabel Subscription Tracking in Sendgrid. Follow this guide. 
https://dgorski.medium.com/setup-unsubscribe-with-sendgrid-api-dynamic-templates-3b942d325d3d

 


YAY! That’s amazing news, @Mikee999🎉

Thanks so much for hopping back in here to share details of the solution you found - it’s very much appreciated! Hopefully it will work for everyone else in the thread here too! 😁🤞


I found a solution :-)

1) Replacing {{{unsubscribe}}} with tunsubscribe] in the code.
2) Enabel Subscription Tracking in Sendgrid. Follow this guide. 
https://dgorski.medium.com/setup-unsubscribe-with-sendgrid-api-dynamic-templates-3b942d325d3d

 

Unfortunately this is not really a solution. I am currently experiencing the same issue. The original problem here was having to do with using the SendGrid app in Zapier (Event: Send Email). This app and event configuration utilizes as an email service provider and does not reference any dynamic templates that are in SendGrid’s Email API. 

I’ve talked with Zapier support and SendGrid support and everyone is pointing fingers at each other. The Zapier app, developed by SendGrid developers, does not reference Unsubscribe Groups or Global Unsubscribe lists. This means that unsubscribed contacts can still receive emails using this specific app and event configuration. Additionally, any HTML using this specific app and event configuration will not sync with SendGrid’s Tracking Settings which ideally would add users to the Global Unsubscribed list or an individual Group Unsubscribe list. 

This issue is still affecting users like us.


Running into the same issue right now. Has anyone found a solution to this?


Apologies for missing your posts here previously ​@wgardner and ​@doledigi12

I’m so sorry about the impact this is having on your workflows and have added both of you to the feature request to ensure you get notified by email as soon as it’s been added. Really appreciate everyone’s continued patience here in the meantime. If we come across any updates or further potential workarounds for this we’ll be sure to share them here! 🙂


Reply