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.

mail-merge-hyperlinks.png 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:

mail-merge-links.png

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

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

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.