Skip to main content
Add images to documents

How to personalize emails with images from a spreadsheet

Luciano Marzoni avatar
Written by Luciano Marzoni
Updated yesterday

When generating documents automatically with Sheetgo, you can include smart tags to personalize them using information from a spreadsheet. You can take this personalization further by placing a specific image for each new file.

To do this, first you need a column with a URL for each image. With that information, Sheetgo can place the right image in each document.

Note: Only image URLs are supported, and they must be public on the internet. This means you need a workaround to add Google Drive images.

Adding image to the document template

There are two ways to add a dynamic images to documents.

1. Using smart tags

When building a document template, insert a smart tag with the IMAGE: prefix followed by the header title of the column that has the image URLs. This smart tag will be dynamically replaced with the corresponding image in the document.

2. Using a placeholder image

Another way to add a dynamic image to a document is with a placeholder image in the template. To do this, add any image to the document, right-click it and select Alt text, then add the smart tag to the alternative text title.

By doing so, there's no need to use the image prefix. This technique ensures that the formatting, style, and location of the image are preserved after replacement.

Workaround to add Google Drive images

Images on Google Drive can't be published on the web, making them difficult to use for document generation and automatic emails. There is a workaround to this limitation.

  1. Share the image with anyone who has the link.

  2. Copy the image code from the URL.

  3. Place it in this link: "google.drive.com/thumbnail?id={image_code}"

  4. Additionally, you can add this suffix to set the desired image pixel size "&sz=w100-h100". You can set only the width or the height, and the aspect ratio will be respected.

If the initial Google Drive URL looks like this:

https://drive.google.com/file/d/1vGzgSDj2-Oce_8LKpwXH5JWDa2PWoSA9/view?usp=sharing

The result would look something like this:

drive.google.com/thumbnail?id=1vGzgSDj2-Oce_8LKpwXH5JWDa2PWoSA9&sz=w500

Did this answer your question?