Skip to content
Digital Inspiration DocsDigital Inspiration Docs

The Embed Chart marker puts a chart from a Google Sheet in your email or document. Document Studio takes a fresh picture of the chart when the row runs, so the chart 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 row. The marker works in the email body, Google Docs, Google Sheets and Google Slides.

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 your workflow and go to the Send Email task.

  4. In the Email Body, 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 Preview and check that the chart is the right one and that its labels are easy to read.

  6. Click Done to save the task.

The chart arrives centered in the message, 560 pixels wide. Document Studio attaches the chart inside the email, so the chart shows even in email apps that block 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, the long code between /d/ and /edit 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 largest height of the picture in pixels, in Google Docs and Sheets 600
linked=true In Google Slides, a chart that stays linked to the spreadsheet A picture of the chart

A Google Sheet with four charts on the Prices tab, labeled with the spreadsheet ID in the address bar, the tab name and the position of each chart

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 row {{Embed Chart, 1AbC…789, sheet={{City}}}}

Write each option after the spreadsheet, with a comma before it. An option can take its value from a column with braces, like sheet={{City}}. If the column title is misspelled or the cell is empty, Document Studio uses the first tab. Embed Graph is another name for Embed Chart.

The sheet and position options can use a marker, so each row of your sheet 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 list of managers 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@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 row’s chart number in a column, like Chart Number, and write position={{Chart Number}}.

The same marker works in Google Docs, Sheets and Slides templates. Tom’s workflow also creates a monthly PDF report for each store from a Google Docs template.

Template Where to put the marker What you get
Google Docs On a line of its own A picture of the chart, centered on that line
Google Sheets Alone in a cell A picture of the chart over the cells, with its top-left corner in that cell
Google Slides Alone in a text box The chart in place of the text box, sized to fit the box

In Google Docs and Sheets, width and height set the largest size of the picture. The chart keeps its shape, and Document Studio never makes it larger than it is in the sheet. Both default to 600 pixels. A picture in Google Sheets must be smaller than 2 MB.

A PDF made from the document includes the chart.

In Google Slides, add linked=true to keep the chart linked to the spreadsheet:

{{Embed Chart, 1AbC…789, sheet={{City}}, position=1, linked=true}}

A linked chart shows an Update button in Google Slides. Click it to bring in the latest numbers from the sheet, long after the workflow made the presentation. Without linked=true, the chart is a picture that doesn’t change.

Draw the text box where the chart should go and make it the size you want. Google Slides doesn’t place charts inside table cells, so use a text box.

A Google Slides template with an Embed Chart marker that uses linked=true, and the slide after the run with the chart in place of the text box

  • Type the spreadsheet in the marker. The spreadsheet can’t come from a column or a marker. A value in your sheet or form can never choose which of your spreadsheets Document Studio reads. The sheet and position options can use markers.
  • The Google account that runs the workflow must be able to open the spreadsheet. Readers don’t need access. They get a picture, not a link to the sheet.
  • The picture shows the chart as it is when the row runs. A scheduled workflow draws the chart again on each run.
  • When the tab name doesn’t match any tab, Document Studio uses the first tab.
  • 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.
  • In an email, height has no effect. The picture keeps the shape of the chart.
  • 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.
  • In the email Subject, Document Studio removes the marker.
  • A marker inside an {% if %} condition adds the chart only when the condition is true.
  • In text messages, such as SMS and Google Chat, Document Studio leaves the chart out.

When Document Studio can’t find the chart, it leaves the chart out and carries on with the row. In Google Slides, the text box stays empty. Look for the reason in the hidden Document Studio Logs sheet of your spreadsheet. See troubleshooting to open it.

Invalid spreadsheet Id in the chart formula

Section titled “Invalid spreadsheet Id in the chart formula”

The spreadsheet part of the marker isn’t a spreadsheet address or ID, or it comes from a column or marker. Paste the spreadsheet’s address into the marker itself.

Cannot find chart for sheet … at position …

Section titled “Cannot find chart for sheet … at position …”

The account that runs the workflow can’t open the spreadsheet, or Google Sheets couldn’t read its charts. Open the spreadsheet in the same Google account and check that you can see the chart. Then run the row again.

The chart is missing, and the log has no message

Section titled “The chart is missing, and the log has no message”

The tab has no chart. Check the tab name after sheet=. If the tab name uses a marker, like {{City}}, check that each of those tabs has a chart.

Check the tab name after sheet=. A tab name that doesn’t match any tab gives a chart from the first tab. Then try another position.

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.