I am sending an HTML email to my costumers after they book a reservation on my restaurant's website. I wanted the email to automatically add an event to the costumer's calendar, and so I was adding the following script after the HTML opening body tag to test it (https://developers.google.com/gmail/markup/reference/restaurant-reservation):
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "FoodEstablishmentReservation",
"reservationNumber": "OT12345",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "John Smith"
},
"reservationFor": {
"@type": "FoodEstablishment",
"name": "Wagamama",
"address": {
"@type": "PostalAddress",
"streetAddress": "1 Tavistock Street",
"addressLocality": "London",
"addressRegion": "Greater London",
"postalCode": "WC2E 7PG",
"addressCountry": "United Kingdom"
}
},
"startTime": "2022-10-01T08:00:00+00:00",
"partySize": "2"
}
</script>
But the event is not being added to the calendar...
To test this I am using gmail to send emails to myself (from [email protected] to [email protected]) (skip google authentication). And I am using the Restaurant reservation schema (suported schemas).
When I inspect the received email's HTML that script is gone. I do see it if I check the original message ("Show original" option on gmail). Is this normal? Did Google/Gmail already "took care of it" before it being displayed on the HTML, or should it be there for Google/Gmail to be able to "recognize it"? I wanted to at least understand at which step the problem is happening.
Any ideas?