google-calendar-apihtml-emailschema.orgmarkupjson-ld

Why there is no add to calendar option pop up when I added json-ld markup for reservation


I am testing schema.org Json-ld markup for email using self mailing as mentioned, This is the sample schema I'm using along with html content sent in mail. I'm sending mail using gmail smtp, and opened the gmail client.

 <script type="application/ld+json">
{
  "type" : "LodgingReservation",
  "checkinTime" : "2025-24-01T15:00:00Z",
  "checkoutTime" : "2025-24-05T11:00:00Z",
  "potentialAction" : {
    "type" : "ReserveAction",
    "name" : "Add to calender",
    "target" : "https://calendar.google.com"
  },
  "reservationFor" : {
    "type" : "LodgingBusiness",
    "address" : {
      "type" : "PostalAddress",
      "addressCountry" : "Sample Country",
      "addressLocality" : "Sample City",
      "addressRegion" : "Sample State",
      "postalCode" : "12345",
      "streetAddress" : "123 Sample Street"
    },
    "name" : "Sample Hotel Chain",
    "telephone" : "+1234567890"
  },
  "reservationId" : "123456789",
  "reservationStatus" : "http://schema.org/ReservationConfirmed",
  "underName" : {
    "type" : "Person",
    "name" : "John Doe"
  },
  "@context" : "http://schema.org"
}
</script>

I want this reservation to be added to my calendar, either with a pop up to add or auto addition.

I have done self-mailing, validated schema using validator, I have checked similar question but there is no solution for checking in self-mailing to test.

I have tried adding potential actions and removing them. I also tried it in microdata format too, but no result. I have tried the version of schema mentioned in Google and validated it in google schema validator, but still no result.

A similar result in node.js Nodemailer too.


Solution

  • I Assume you are sending mail via a smtp client of your language programatically, I think the problem is for the mail client to process jsonld, the would require mail with DKIM or SPF authentication even for self-testing. Normally the mail sent from even gmail to gmail would ignore those headers. I suggest you send mail from register domain, which would have those authentication or send it from google testing tool AppScript