Skip to content

How to Add a Chart from Google Sheets to Your Emails

The Embed Chart marker puts a chart from a Google Sheet in your email as a picture. Mail Merge takes a fresh picture of the chart when the campaign runs, so the email shows the latest numbers.

Use the marker for a monthly sales report, a fundraising progress chart, survey results, or a chart that is different for each person.

Tom at Becker Bikes emails a short report to his three store managers on the first of each month. His Store Sales spreadsheet has a tab named Dashboard with a column chart of last month’s sales.

  1. Open the spreadsheet that holds the chart and copy its address from your browser’s address bar. The address looks like https://docs.google.com/spreadsheets/d/1AbC…789/edit.

  2. Note the name of the tab that holds the chart, like Dashboard.

  3. Open the sheet with your mailing list. Go to Extensions > Mail Merge with Attachments > Open Mail Merge, open your campaign and move to the Template step.

  4. In the Message box, type an Embed Chart marker on a line of its own. Paste the spreadsheet’s address after the first comma, then add sheet= and the tab name.

    Hi {{First Name}},
    Here is how the three stores did in November.
    {{Embed Chart, https://docs.google.com/spreadsheets/d/1AbC…789/edit, sheet=Dashboard, width=560}}
    The full numbers are in the Store Sales sheet.
    Tom
  5. Click Send Test Email and send the email to yourself. Check that the chart is the right one and that its labels are easy to read.

  6. Go to the Save & Run step and click Send Emails.

The chart arrives centered in the message, 560 pixels wide. Mail Merge attaches the chart inside the email, so the chart shows even in email apps that hide pictures from the web.

{{Embed Chart, spreadsheet, sheet=Tab name, position=1, width=600}}
Part What to enter If you leave it out
spreadsheet The spreadsheet’s address from your browser, or only its ID Required
sheet= The name of the tab that holds the chart. Capital letters and spaces don’t matter. The first tab
position= Which chart on that tab, counting from 1 1, the first chart
width= The width of the picture in pixels 600
height= The height of the picture in pixels Follows the chart’s shape
You want Marker
The first chart on the first tab {{Embed Chart, 1AbC…789}}
The chart on a named tab {{Embed Chart, 1AbC…789, sheet=Dashboard}}
The second chart on that tab {{Embed Chart, 1AbC…789, sheet=Dashboard, position=2}}
A smaller picture {{Embed Chart, 1AbC…789, sheet=Dashboard, width=400}}
A different chart for each person {{Embed Chart, 1AbC…789, sheet={{City}}}}

The sheet and position options can use a merge field, so each row of your mailing list can show a different chart.

Tom’s spreadsheet also has one tab for each store, named New York, London and Madrid. Each tab has a chart of that store’s daily sales. His mailing list has a City column with the same names.

First Name Email Address City
Angus angus@example.com New York
Daniel daniel.okafor@example.net London
Sofia sofia.marquez@example.org Madrid
Hi {{First Name}},
Here are the daily sales for the {{City}} store in November.
{{Embed Chart, 1AbC…789, sheet={{City}}, width=560}}

Angus gets the chart from the New York tab, and Daniel gets the one from London.

When all the charts are on one tab, put each person’s chart number in a column, like Chart Number, and write position={{Chart Number}}.

Use Marker
Fundraising progress for all donors {{Embed Chart, 1AbC…789, sheet=Campaign, width=500}}
Survey results for everyone who answered {{Embed Chart, 1AbC…789, sheet=Results, position=1}}
Each student’s progress chart, one tab each {{Embed Chart, 1AbC…789, sheet={{Student ID}}}}
Each sales rep’s chart on a shared tab {{Embed Chart, 1AbC…789, sheet=Team, position={{Chart Number}}}}
A chart with the numbers below it An Embed Chart marker, then an Embed Range marker on the next line
  • Type the spreadsheet in the marker. The spreadsheet can’t come from a column or a merge field. A value in your mailing list can never choose which of your spreadsheets Mail Merge reads. The sheet and position options can use merge fields.
  • The Google account that runs the merge must be able to open the spreadsheet. Recipients don’t need access. They get a picture, not a link to the sheet.
  • The picture shows the chart as it is when the campaign runs. With scheduled emails, Mail Merge draws the chart again on each run.
  • A position larger than the number of charts on the tab gives the first chart.
  • Google Sheets numbers the charts in its own order, which isn’t always their order on the screen. If you get the wrong chart, try another position.
  • Readers can’t hover over or click the chart. Put the key numbers in the text or in a table below the chart.
  • Give the chart a title and axis labels in the sheet. The picture is all the reader sees.
  • The marker works in the message only. Mail Merge removes the marker from the subject and from plain text emails.

A problem with the spreadsheet or the chart would affect every email, so Mail Merge stops the campaign and shows the reason in the log. Fix the marker and click Send Emails again.

Embed Chart needs a spreadsheet typed in the template

Section titled “Embed Chart needs a spreadsheet typed in the template”

The spreadsheet is missing, or it comes from a merge field. Paste the spreadsheet’s address into the marker itself.

The tab has no chart. Check the tab name after sheet=. If the tab name uses a merge field, like {{City}}, check that every row has a value and that each of those tabs has a chart. When the name doesn’t match any tab, Mail Merge looks on the first tab.

Google couldn’t make a picture of the chart. Open the spreadsheet with the account that runs the merge and check that you can see the chart. Then run the campaign again.

Make the chart larger in the sheet, or use bigger fonts in the chart editor under Customize. A wide chart shrunk to 400 pixels has small labels.