I wanted to do something similar: display an image thumbnail and link to update that image in Airtable via a Slack bot. Linking to the field was straightforward but when I tried to add a thumbnail to an attachment field the automation failed.
Here’s how I solved it.
Create two fields:
1. An attachment field. At the time I’m posting this Airtable requires the attachment field type to be an array, meaning you can’t limit to just one attachment. So, in order to chose the URL, you need to specify where to find the URL in the potential array of attachments. I called my field basicTemplateScreenshotAttachment.
2. A formula field that specifies which URL to include from your attachment. You can read more here. Here’s my formula:
RIGHT(LEFT({basicTemplateScreenshotAttachment},
LEN({basicTemplateScreenshotAttachment}) - 1),
LEN(LEFT({basicTemplateScreenshotAttachment},
LEN({basicTemplateScreenshotAttachment}) - 1)) -
SEARCH(“https://”, {basicTemplateScreenshotAttachment}) + 1)
Screenshot of my message:
NOTE: When the message it sent to Slack for a second time with an unchanged URL, slack does not display the thumbnail. Slack only displays the image thumbnail when the message is sent for the first time with that unique URL.
Hopefully this helps!