All Collections
Misc
Guides leveraging external tools
Embedding Photos in an Email Notification with Zapier
Embedding Photos in an Email Notification with Zapier

How to embed photos in an email notification with Zapier. (Intermediate)

Jacob Payne avatar
Written by Jacob Payne
Updated over a week ago

In this guide, it is assumed that you are familiar with setting up email notifications with Zapier.

By leveraging Data Shares and a calculation field, photos can be embedded in the emails that are sent using Zapier.

Enabling the Data Share

To start, you will want to enable data shares on the app that you want to send the email notifications with embedded photos. This can be done through the app’s dashboard page. There will be a dedicated data share tab that you can click on to manage the data shares for the app.

Once you have a data share enabled, you will want to copy down the share_id. This is the sequence of number and letters right before the data share file extension (web.fulcrumapp.com/shares/{data_share_id}.csv).

Adding the Calculation Field

Now that you have the data share enabled you can add the calculation field to your app. It might be a good idea to make the calculation field hidden since it can cause unnecessary noise for people collecting and reviewing data in Fulcrum.

Inside the calculation field, you will want to add the code below.

var html = ""
$photos.forEach(function(photo) {
html += "<p><img src='https://web.fulcrumapp.com/shares/{share_id}/photos/"+photo.photo_id+"/thumbnail.jpg'></p>"
})
SETRESULT(html);

The only two possible modifications that you will need to make to the code above. The first one is to make sure that ‘$photos’ is the data name of the photo field that you want to pull the photos in from. The second is to add the share_id to the URL.

Conclusion

Now that you have the data event enabled and the calculation field setup, you can set up the email zap that is sent through with Zapier to include the calculation field. When the email is received, you will notice that the photos are directly in email body.

Did this answer your question?