Using SendGrid to send photos in email

Hi, each record in my table has an email address {email} and photo {photo}. For each record, I’d like to send the record’s photo to the record’s email address. Is there a way to do this using SendGrid? I’ve tried turning on “Send as HTML” and doing <img src="{photo}"> but doesn’t work as {photo} is replaced by “filename (url-to-file)” when I only want url-to-file.

Hey Will,

It’s possible to send photos from an attachment field in the Sendgrid block as long as there’s just one photo uploaded per attachment cell. To do so, first add a formula field to pull the URL from the attachment field:

MID({attachment}, FIND('dl.airtable.com', {attachment}), LEN({attachment}) - FIND('dl.airtable.com', {attachment}))

Then, as long as your Sendgrid block is configured to Send as HTML,

image.png

you can reference the formula field to display the image:

<img src="{Attachment URL Formula}">

Does this help?

1 Like

Yes - thank you so much!

Did this change? I’ve tried this within mine and the image does not come across.