Mar 10, 2021 02:14 PM
Is there a workaround to use rich text markdown for a formula that provides a URL?
More context: My formula provides a lengthy URL, and it triggers a slack notification. Would love to mark down so the slack notification doesn’t take up the entire window!
Thanks in advance for your advice.
Solved! Go to Solution.
Mar 11, 2021 09:00 AM
You put the markdown into the wrong field. Per my example, it’s supposed to go into a long text field with rich text enabled. That’s how it produces the link. In your example, you put it into the field that’s supposed to contain the record that you’re updating. That record should come from the triggering step.
Not quite. In my example, {Site Name}
is the name of a website, and will be shown as the text tied to the hyperlink. I should have included this screenshot to make that more clear:
In this test, {Site Name}
and {URL}
are both manual entry. After setting up the automation, typing/pasting the site name into the appropriate field created the markdown hyperlink in the {Link}
field via the automation.
I couldn’t quite gather from your description if the target site is Slack or something else. If it’s always going to be Slack, then you won’t need a {Site Name}
field. Once you’ve added a long text field with rich text enabled, your setup for that update step would look like this:
Does that make sense?
Mar 10, 2021 07:56 PM
Unfortunately, I don’t think there’s any way to do this (at least not simply with Airtable alone). I tried several different ways, using long-text fields, producing the string in the formula field that looks like the markdown I want, inserting the markdown syntax into the slack message in the automation – none of it produced a styled markdown link.
Sad :cry:
Mar 10, 2021 08:21 PM
This could be done with the help of an automation that updates a rich text field based on the formula field’s output. Set the automation trigger to “When a record is updated”, and have it look for changes in the formula field (and optionally another field that’s used for the link text). The action would be “Update record”, and update a rich text field like this:
This works in a test that I just ran. I’m using two manual entry fields—one for the site name, one for the URL—but this should also work with a formula generating the URL.
Mar 11, 2021 06:16 AM
Thans @Justin_Barrett. I’m getting an error when I try this but maybe I’m inputting something wrong?
To be more clear here’s the entire action: I don’t have anything in the “Site Name” column on my table (they are empty fields, assuming this automation will populate them) —am I understanding correctly?
Mar 11, 2021 09:00 AM
You put the markdown into the wrong field. Per my example, it’s supposed to go into a long text field with rich text enabled. That’s how it produces the link. In your example, you put it into the field that’s supposed to contain the record that you’re updating. That record should come from the triggering step.
Not quite. In my example, {Site Name}
is the name of a website, and will be shown as the text tied to the hyperlink. I should have included this screenshot to make that more clear:
In this test, {Site Name}
and {URL}
are both manual entry. After setting up the automation, typing/pasting the site name into the appropriate field created the markdown hyperlink in the {Link}
field via the automation.
I couldn’t quite gather from your description if the target site is Slack or something else. If it’s always going to be Slack, then you won’t need a {Site Name}
field. Once you’ve added a long text field with rich text enabled, your setup for that update step would look like this:
Does that make sense?
Mar 11, 2021 10:58 AM
YAY! This worked. Thank you so much for all of your help! Quite the workaround but I’m so happy to have a working solution :slightly_smiling_face:
Mar 11, 2021 11:53 AM
@Justin_Barrett one more question though, I can’t get the rich text field to display on slack now. Is that possible? The whole point of shortening this URL was so that it would show up nicely on slack. I was hoping adding the “site name” column (my “Resubmit Form” hyperlink) would show up in Slack… but it doesn’t turn back anything. Any advice there?
Dec 23, 2022 04:31 AM
I wanted to add social media icons to my email with a hyperlink. I spend several hours to understand what to do here for my emails! Finally, I was able to solve it with this solution:
[<img src="link to icon" style="width:5%;height:5%" />](link-to-socialmedia)
For example,
[<img src="https://img.shields.io/badge/Instagram-%23E4405F.svg" style="width:5%;height:5%" />](https://www.instagram.com/)
just add this line to the end of your email and it will add a social media icon that if you click on it, will be open your social media page!