Add event record into Google calendar by email - email

How to send email-notification that will add an event. Using this tool I sent "event card" to my Gmail and receive an email as well as notification about adding a new event to my calendar. But if I try to send this exactly "event card" content via PHP, for example, than I receive an email, but not new event in my calendar. What am I doing wrong?
<html>
<head>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "E123456789",
"underName": {
"#type": "Person",
"name": "Andrii Tarykin"
},
"modifiedTime": "2013-11-02T13:15:00-08:00",
"modifyReservationUrl": "http://gmail-actions.appspot.com/success/{{token}}",
"reservationStatus": "confirmed",
"reservationFor": {
"#type": "Event",
"name": "Foo Fighters Concert",
"performer": {
"#type": "Person",
"name": "Metallica",
"image": "http://example.com"
},
"startDate": "2015-10-01T13:07:55",
"location": {
"#type": "Place",
"name": "AT&T Park",
"address": {
"#type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
}
}
</script>
</head>
<body>
<p>
This a test for an Event reservation Google Now card in Gmail.
</p>
</body>
</html>
This code doesn't work for me, it doesn't add event in my calendar.

Related

Local Business Structured Data doesn't shows in Search console

Hey 👋 I need some help please
I have structured data (JSON-LD) on a website for a Local Business
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "Restaurant",
"name": "Pizza cafe",
"address": {
"#type": "PostalAddress",
"streetAddress": "some street address",
"addressLocality": "city name"
},
"telephone": "+421234567890",
"servesCuisine": "Pizza",
"geo": {
"#type": "GeoCoordinates",
"latitude": 48.172356,
"longitude": 17.238084
},
"openingHours": [
"Mo 11:00–20:30",
"Tu 11:00–20:30",
"We 11:00–20:30",
"Th 11:00–20:30",
"Fr 11:00–20:30",
"Sa 11:00–20:30"
],
"image": [
"https://image.com/photo.jpeg"
],
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.4",
"ratingCount": 200,
"bestRating": 5,
"worstRating": 1
},
"priceRange": "€€"
}
</script>
and Rich Results Test parse it correctly
But in Search console I can see only Review snippet, and I can't understand why I can't see local business data
What could be the reason?

Google Email RentalCarReservation Schema markup not showing up in Calendar

I added a RentalCarReservation schema markup to my email, which has passed all the tests for whitelisting by Google, except that it does not create the calendar event automatically. I do see the event card above my email in Google and the action button is also working, but whatever I do, the event is not shown in the calendar (despite having 'Smart features' enabled in all Google apps).
https://www.google.com/webmasters/markup-tester/ lists no issues. I thought it might have something to do with the formatting of the datetime and switched this up a few times, but the card above the email shows the correct day and time.
What might I be doing wrong? Any help is appreciated!
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "RentalCarReservation",
"reservationNumber": "11111",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"url": "https://www.test.com/app/",
"underName": {
"#type": "Person",
"name": "FirstName",
"email": "firstname#email.com"
},
"programMembership": {
"#type": "ProgramMembership",
"memberNumber": "222222"
},
"bookingAgent": {
"#type": "Organization",
"name": "OrganizationName",
"url": "https://www.test.com/"
},
"bookingTime": "2022-02-22T06:25:07-01:00",
"modifyReservationUrl": "https://www.test.com/app/book?id=11111",
"potentialAction": [
{
"#type": "CancelAction",
"target": "https://www.test.com/app/edit?id=11111"
}
],
"reservationFor": {
"#type": "RentalCar",
"name": "Mini Cooper",
"model": "Mini Cooper",
"brand": {
"#type": "Brand",
"name": "Mini"
},
"description": "Ipsem Lorum.",
"rentalCompany": {
"#type": "Organization",
"name": "OrganizationName"
}
},
"pickupLocation": {
"#type": "Place",
"name": "Parkeerlocatie",
"address": {
"#type": "PostalAddress",
"streetAddress": "Nijmegenweg 2",
"addressLocality": "Almere",
"addressRegion": "Flevoland",
"postalCode": "1111AA",
"addressCountry": {
"#type": "Country",
"name": "NL"
}
},
"telephone": "+31000000000"
},
"pickupTime": "2022-03-11T07:00:00-01:00",
"dropoffLocation": {
"#type": "Place",
"name": "Parkeerlocatie",
"address": {
"#type": "PostalAddress",
"streetAddress": "Nijmegenweg 2",
"addressLocality": "Almere",
"addressRegion": "Flevoland",
"postalCode": "1111AA",
"addressCountry": {
"#type": "Country",
"name": "NL"
}
},
"telephone": "+31000000000"
},
"dropoffTime": "2022-03-11T10:00:00-01:00"
}
</script>

JSON-LD "Event reservation" update & cancellation

I was required to implement the JSON-LD standard in EVENT RESERVATION email sent from an event portal to automatically add, update and cancel an event from the user's calendar.
I'm following this tutorial from Google https://developers.google.com/gmail/markup/reference/event-reservation#update_a_event
I've only managed to automatically add an event whenever the user receive the booking email, however I'm struggling to find a way how to implement the update and cancellation.
For the ADD event I'm using this code
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "John Smith"
},
"reservationFor": {
"#type": "Event",
"name": "Foo Fighters Concert",
"startDate": "2017-03-06T19:30:00-08:00",
"location": {
"#type": "Place",
"name": "AT&T Park",
"address": {
"#type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
}
}
</script>
The result in my calendar is the following
Then I try to send this code to UPDATE the event, however I do not notice any changes in the calendar. The event is still in the same date.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "John Smith"
},
"reservationFor": {
"#type": "Event",
"name": "Foo Fighters Concert",
"startDate": "2017-03-06T20:00:00-08:00",
"location": {
"#type": "Place",
"name": "AT&T Park",
"address": {
"#type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"modifiedTime": "2013-05-01T08:00:00-08:00"
}
</script>
Have you an idea why the code, taken directly from the google's tutorial. is not working? And how can I implement those functionalities?
You should try to add the "modifiedTime" tag when you add the event the first time, as it serves as the booking time.
Google then detects that, if the id is the same and the modifiedTime is different, the event should be updated.

Use image gallery and main text in Product

This is an example of JSON-LD for a Schema.org Product:
<script type="application/ld+json">
{
"#context": "http://schema.org/",
"#type": "Product",
"name": "Executive Anvil",
"image": "http://www.example.com/anvil_executive.jpg",
"brand": {
"#type": "Thing",
"name": "ACME"
},
"aggregateRating": {
"#type": "AggregateRating",
"ratingValue": "4.4",
"ratingCount": "89"
},
"offers": {
"#type": "AggregateOffer",
"lowPrice": "119.99",
"highPrice": "199.99",
"priceCurrency": "USD"
}
}
</script>
But I have a lot of more properties for my product.
For example a related gallery, related videos, a long main text.
There are not these properties in Product.
Do I have to leave them? Or is there a way to use them?
For content about the product (like a video, a gallery, an article, etc.) you could use the Product item as value of the about property:
{
"#context": "http://schema.org/",
"#type": "VideoObject",
"name": "Video about your product",
"about": {
"#type": "Product",
"name": "Your product"
}
}
With JSON-LD’s #reverse, you can specify these within the Product item, if you prefer it:
{
"#context": "http://schema.org/",
"#type": "Product",
"name": "Your product",
"#reverse": {
"about": {
"#type": "VideoObject",
"name": "Video about your product"
}
}
}

google now not showing event registration card

I am able to see the event in email but not in Google Now app. I am triggering email from Google App Script. The markup has been verified by Google's markup tester and is valid. Below is JSON-LD format:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "IO123456789",
"modifyReservationUrl": "http://www.searshomeservices.com",
"modifiedTime": "2015-03-04T02:30:00-06:00",
"underName": {
"#type": "Person",
"name": "John Smith"
},
"reservationStatus": "http://schema.org/Confirmed",
"reservationFor": {
"#type": "Event",
"name": "Event Confirmation",
"startDate": "2015-03-05T04:30:00-06:00",
"performer": {
"#type": "Person",
"name": "Jitendra",
"image": "https://lh3.googleusercontent.com/-qYfc01xZOSg/Uw46cceE_EI/AAAAAAAAABw/xNYxVibhDSs/s70-no/cara_verde.png"
},
"location": {
"#type": "Place",
"name": "Moscone Center",
"address": {
"#type": "PostalAddress",
"streetAddress": "800 W Howard St.",
"addressLocality": "Chicago",
"addressRegion": "IL",
"postalCode": "60626",
"addressCountry": "US"
}
}
}
}
</script>