Mergo: Designing a template gallery in a Google Workspace add-on

Romain Vialard
2 min readOct 28, 2021

About Mergo:
Mergo is a mail merge add-on for Google Workspace.
It lets you run email campaigns from Gmail, Google Sheets or Docs.
✍️ You can write your content directly in a Gmail draft, or use Google Docs for advanced formatting and Mergo will automatically convert the doc into an email 🪄

🆕 I’ve just added a Template Gallery in Mergo!
Instead of starting your email from scratch, you can open the gallery and select a template: it will appear as a draft in Gmail.

⚠️ Currently this feature is only available to Google Workspace accounts, not gmail.com ones. ⚠️

It works as an internal gallery too! 👍
You can create new templates in Google Docs and add them to the gallery: any colleague with access to your doc will see it in the gallery (thus you can keep your template private, share it with specific teammates or make it available to your whole domain).

A lot of users were asking for an easy way to share their templates with coworkers or simply have a place to store & reuse their own templates. It was already possible with Mergo to create a template in Google Docs, share that doc and reopen it any time you wanted to run a new campaign but Stéphane Giron, fellow GDE, convinced me to make that more user friendly. 🤔

At the same time, I was eager to find a good reason to use the new Grid view Google released for the CardService (the service used to build consistent and secure UIs in Google Workspace add-ons).

Perfect occasion!

With the Google Drive API, I can easily retrieve a thumbnail for each template via the getThumbnail() method, then show all those thumbnails + template title & owner in a beautiful grid.

And with the ComposeActionResponseBuilder available in the CardService, from a simple click on a template, a draft is created and automatically displayed in your Gmail UI! 👌

--

--

Romain Vialard

Google Developer Expert, creator of several successful add-ons for Gmail, Drive,...