
Email Schema is a type of structured data based on Schema.org vocabulary that allows email providers such as Gmail to understand the content of an email. By embedding JSON-LD inside an HTML email, businesses can display interactive buttons, order details, delivery tracking, reservations, invoices, and event information directly within the inbox. Email Schema improves user experience, increases engagement, and enables Gmail to generate rich email previews.
How Email Schema Works
Email Schema uses JSON-LD embedded inside the HTML version of an email.
<script type="application/ld+json">
{
"@context":"https://schema.org",
"@type":"EmailMessage"
}
</script>
{
"@context":"https://schema.org",
"@type":"EmailMessage"
}
</script>
When Gmail receives the email, it:
- Verifies SPF, DKIM and DMARC.
- Parses the JSON-LD.
- Validates the schema.
- Displays interactive content if the sender is trusted.
Basic EmailMessage Schema
This is the simplest Email Schema.
{
"@context":"https://schema.org", "@type":"EmailMessage", "description":"Welcome to our platform."
}
"@context":"https://schema.org", "@type":"EmailMessage", "description":"Welcome to our platform."
}
Use this as the root object for action-based emails.
1. ViewAction
Used to open a webpage directly from Gmail.
Example:
- View Invoice
- View Order
- Read Report
{
"@context":"https://schema.org", "@type":"EmailMessage", "potentialAction":
{ "@type":"ViewAction", "target":"https://example.com/order/1456", "name":"View Order"
}
}
"@context":"https://schema.org", "@type":"EmailMessage", "potentialAction":
{ "@type":"ViewAction", "target":"https://example.com/order/1456", "name":"View Order"
}
}
2. ConfirmAction
Allows users to confirm an action without searching inside the email.
Example:
- Email Verification
- Appointment Confirmation
- Subscription Confirmation




















