Help

Inserting Hyperlinked Text Into SendGrid App

Topic Labels: Extensions
2325 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_Miller2
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey Airtable Community!

For the past few weeks I’ve been trying to design the following process:

  1. A user submits a form entry.
  2. Depending on whether the user indicates if they’ve submitted an entry before and whether they want their entry used for a specific project, a formula field will produce a certain text string.
    3.That formula field is added in curly brackets to a SendGrid HTML template, so that the appropriate text swaps in to each individual email, rather than me needing several different templates.

This all works fine. I started running into trouble when I then tried to add hypertext. I thought I could get away with this by putting it directly in my formula (this is an example version):

IF({Adaptation Switch}="Yes", "Text 1","Text two, and visit us <a href=\"https://www.airtable.com\">here</a>!")

Of course, the slashes are there so that the quotations for the hypertext HTML don’t mess with the string formula.

But when I then go to preview the email in SendGrid, it doesn’t appear to work. I just get this:
Screen Shot 2021-10-01 at 2.24.38 PM

Any thoughts on how to solve? What’s the best possible workaround?

3 Replies 3

I recommend working around this by not using the SendGrid app. :slightly_smiling_face: There’s no way to use formulas to pass HTML to the SendGrid app, but both of the email actions available in Airtable automations will work with this just fine. The other benefit to using an automation is that it’s hands-off, compared to the SendGrid app which requires you to manually trigger everything.

@Justin_Barrett it would definitely make my life simpler, but I just don’t think that’s an option for me right now because I can’t format the Gmail/Airtable email automations like I can with SendGrid–yes it’s manual, but I can build a way better design since the app accepts HTML code that I can transfer over from SendGrid’s template designer (I’m not much of a coder). Is there really no other work around? And if so, is there a way to insert rich HTML–not just the markdown options Airtable gives–into the Gmail automation?

The fine print above the “Message” field in the Gmail automation action setup panel says, “Use markdown or HTML for rich text formatting.” While the Gmail action docs don’t mention specific tags, the FAQ section for the standard “Send email” action says this:

How can I format the emails I send out?

We support using Markdown syntax and a variety of HTML tags within your emails to ensure things are formatted the way you’d like. We currently support using the following HTML tags: <b> , <br> <u> , <strong> , <em> , <img> , <a> and <span> tags. You can also include inline CSS by adding a style attribute to your HTML tags."

My gut says the same tags work in the Gmail action as well. If you want to test, you can always insert tags and use the “Preview email” button to see if they work.