How to Include Unique Hyperlinks (URLs) in Email Messages with Gmail Mail Merge
This tutorial explains how you can include personalized and unique hyperlinks (or website URLs) in Gmail Mail Merge.
First, open the Gmail draft that you wish to use as a template for Mail Merge. Here, insert the column name of the Google Spreadsheet that will contain the hyperlink data and enclose the column in double brackets as shown in the screenshot.
The variable {{website link}}
will be replaced with a live hyperlink
In this example, we are using the variable {{Website Link}}
but you are free to use any name as long as the column content matches the hyperlink syntax.
Now switch to the Mail Merge sheet and insert a column. Set the header of this column as Website Link, same as our variable name but without the brackets.
Next, you need to provide the hyperlinks using HTML markup. For instance, if you wish to include a hyperlink to google news and the title of the link should say Google Sheet, your cell value should be:
<a href="http://news.google.com/">Google News</a>
Here’s how the sheet data would look like:
When your run Mail Merge, the {{Website Link}}
variable will be auto-replaced by corresponding hyperlinks that will be clickable as well.
Also, other than website hyperlinks, you can include mailto links (see row #4) that will invoke the email click on click. The subject line of the email link can be customized with the mailto syntax.
Amit Agarwal
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.
Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory