Hi there,
I’ve been using the Sendgrid node to send email alerts and recently I’ve noticed that the URLs in the links are broken.
I have made a test workflow to replicate the problem:
And here is what the link looks like in the email:
I’m not too sure what happens here?
Cheers
Jules
What happens when you actually click the link? Are you redirected to the expected page or are you dropped on a 404 somewhere? If the latter, can you provide the link that the browser ultimately resolves to?
My theory is that this is just Sendgrid’s Click Tracking feature; they replace the href
of all <a>
tags in your emails with something pointing back to their servers so that the traffic hits them first (where the click is tracked) and then the user is forwarded on to the actual URL. This is pretty common for email delivery services.
I’ve visited the link five times now and have gotten three different results:
- 525 Error (SSL handshake failed). Screenshot attached. (happened twice)
- Since the link is http, I changed the protocol to https and visited that and got a page similar to the 525 page but for a timeout instead.
- Your marketing site’s 404 page as you stated.
I still think the issue is somewhere in your SendGrid configuration; Losant is not changing the email body you submit to SendGrid.
Not having access to your SendGrid account, the next thing I would try is disabling tracking for your link. From their documentation:
Click tracking can be turned off for individual links by including the clicktracking=off
attribute inside the anchor of an HTML link before the href
. For example, <a clicktracking=off href="http://example.com">link text</a>
would not be tracked.
If SendGrid does not replace your URL with the one you’re getting in your inbox with that attribute in place, then that would be the smoking gun that the issue is in their click tracking / your domain configuration.
Thanks @Dylan_Schuster, I have disabled the tracking as instructed and it works.
Next step I guess is to understand why this worked before and doesn’t anymore?
Do you think this is purely on SendGrid’s hand?
Cheers
Jules
I feel strongly about that, yes. Losant runs your email body through the templating engine, rendering {{handlebars.helpers}}
against values from your workflow payload, and we take that resulting string and pass it straight through to SendGrid. Behind the scenes we’re using their own client library to get the request over to them.