I am trying to add a unique link to a sendgrid template, but so far I have had no luck. The button in the sendgrid is the following:
<a href="-org_url-" target="_blank">Accept</a>
I have also tried:
<a href="{{org_url}}" target="_blank">Accept</a>
My javascript function looks like this:
const msg = {
to: process.env.EMAIL_TO,
from: process.env.EMAIL_FROM,
templateId: process.env.SENDGRID_TEMPLATE_ID,
dynamic_template_data: {
org_url: `${process.env.ORG_URL}/${key}`,
},
substitutions: {
'-org_url-': `${process.env.ORG_URL}/${key}`
}
};
Upon checking the sent email, the href field is either empty or only has -org_url- in it. How could I pass it the proper link? Thank you!