Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add Go to Action in Gmail Subject Line using Schema.org?

I am trying to add Go To Action in Gmail subject line using Gmail "Quick Actions" but every time it comes without action link in mail subject.

Here is my mail body:

<html>
  <head>
    <script type="application/ld+json">
    {
      "@context":       "http://schema.org",
      "@type":          "EmailMessage",
      "description":    "Check this out",
      "action": {
        "@type": "ViewAction",
        "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>

Can anyone help me to figure out the problem?

like image 295
Harsh Avatar asked Mar 11 '14 06:03

Harsh


1 Answers

Please note that the mails must be authenticated via DKIM or SPF and that you have to register with Google. Without registering, it just works when you send the email to yourself.

You can find more information here: https://developers.google.com/gmail/actions/registering-with-google

like image 108
Markus Lanthaler Avatar answered Sep 22 '22 05:09

Markus Lanthaler