Adding a photo in an email depending on who something's assigned to

  • 4 November 2019
  • 0 replies
  • 3890 views

Userlevel 7
Badge +11

This workflow allows you to add an a specific image in an email based on information from the trigger.

Let's say you're a small sales team and share an inbox. When you get an new assigned client in your CRM, you want to send them an email from your shared inbox, but you want it to have the signature and headshot of the salesperson that the client has been assigned to. Here's how you can do that...


Get your images online

First, you'll need to make sure that you have all of the images stored online. Make sure that they're all the size that you're going to want them in the email. The file will need to end in the file type (eg .jpg, .png, etc).

Google Drive isn't great for this kind of thing, because the links that it generates are for viewing or downloading rather than a stored file. In a perfect world, the best place to host the image would be on your own server, if that's not possible then an image hosting service like imgur should do the trick.

A good way to test whether or not the link will work is to copy and paste it into a browser. If all you see is the image then it should work, if you see the image in the context of an app (like Google Drive or Dropbox) it wont work.


Add a Lookup table to your Zap

The lookup table will take the assignee from the trigger information and use that to tell the Zap which image to use.

To add the lookup table:

1. Add a Formatter by Zapier step to your Zap

2. Select the utilities option and then the Transform: Lookup Table

3. Add the Assignee as the Lookup Key

4. Add the Assignees in the Lookup Values - add the names on the left and the image links on the right


email-sig-lookup.png


Adding the image to the Email

We're going to assume that you're using Gmail here, so start by adding a Gmail Send Email action to the Zap.

Add whatever you need into the To, From, Subject, etc fields and when you reach the Body field, make sure that the Body Type is set to HTML.

In the body of the text, where you want the picture, type <img scr=""> and add the output of the lookup step in between the quote marks.


email-sig-gmail.png


Now, each time the Zap runs, it will select the correct image using the lookup table and add it to the Email!



This post has been closed for comments. Please create a new post if you need help or have a question about this topic.