Skip to content
Advertisement

Pass Google Apps Script (GAS) – Charts Service chart to HTML Template within GAS

https://developers.google.com/apps-script/reference/charts

I’d simply like to pass the chart object generated from Charts Service within the HTML template (where I choose – not as an attachment, but within the template) to email. I have had success attaching the chart object, but I’d like to integrate this within the email itself/embed

Here is the Google Apps Script code (using the link above code as well) ↓↓↓ */

JavaScript

Advertisement

Answer

Unfortunately, it seems that in the current stage, Gmail cannot directly include the image data as the URL. So, in your situation, how about showing the image as the inline image? When your script is modified it becomes as follows.

Modified script:

Google Apps Script side:

JavaScript

HTML side:

JavaScript

Reference:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement