apps-script-samples icon indicating copy to clipboard operation
apps-script-samples copied to clipboard

Nothing happens in email received from gmail/markup

Open mike-hogan opened this issue 3 years ago • 1 comments

Summary

Followed the steps as per https://developers.google.com/gmail/markup/apps-script-tutorial, send an email to myself, received email looks plain - no action button visible.

Expected Behavior

I expected to see an action button in the received email

Actual Behavior

No action button

Steps to Reproduce the Problem

  1. follow https://developers.google.com/gmail/markup/apps-script-tutorial
  2. execute the action in the app script editor
  3. view the email - there is nothing

mike-hogan avatar May 27 '22 09:05 mike-hogan

Hey @mike-hogan,

i was going through this myself yesterday. The HTML example from the apps-script-tutorial is outdated and being checked in googles own Email Markup Tester can lead you to the answer to this problem: Image

So with that information the corrected version of the mail_template.html from the Apps Script Quickstart Tutorial looks like:

<html>
  <head>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "EmailMessage",
      "description": "Check this out",
      "potentialAction": {
        "@type": "ViewAction",
        "name": "SHOW ME A BUTTON 🙏",
        "url": "https://www.youtube.com/watch?v=eH8KwfdkSqU"
      }
    }
    </script>
  </head>
  <body>
    <p>
      This a test for a Go-To action in Gmail.
    </p>
  </body>
</html>

PS: Now also realizing i have been here before :D. Anyhow this time i solved it ;)

42LM avatar Jun 06 '25 07:06 42LM