Search code examples
google-schemas

Multiple email markups for Gmail and Inbox


Does Google support adding multiple markups in one email? For e.g i want to add an action button markup for Gmail and a Highlight markup for Inbox. Can this be done? I did not find any documentation for it.


Solution

  • Yes, having multiple markups is supported. For example, for a flight reservation.

    All the code until "arrivalTime" is standard for a basic flight confirmation, but with the addition of "checkinUrl" you add a Go-To action to create a [Check In] button in Gmail.

    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "FlightReservation",
      "reservationNumber": "RXJ34P",
      "reservationStatus": "http://schema.org/Confirmed",
      "underName": {
        "@type": "Person",
        "name": "Eva Green"
      },
      "reservationFor": {
        "@type": "Flight",
        "flightNumber": "110",
        "airline": {
          "@type": "Airline",
          "name": "United",
          "iataCode": "UA"
        },
        "departureAirport": {
          "@type": "Airport",
          "name": "San Francisco Airport",
          "iataCode": "SFO"
        },
        "departureTime": "2017-03-04T20:15:00-08:00",
        "arrivalAirport": {
          "@type": "Airport",
          "name": "John F. Kennedy International Airport",
          "iataCode": "JFK"
        },
        "arrivalTime": "2017-03-05T06:30:00-05:00"
      },
      "checkinUrl": "http://united.com/onlinecheckin.html",
      "potentialAction": {
        "@type": "CheckInAction",
        "target": "http://united.com/onlinecheckin.html"
      }
    }
    </script>