Gmail Events
Gmail events fire when emails are received or sent through your connected Gmail account. These events provide complete email details including sender, recipients, subject, body, attachments, and labels, with support for automatic content enrichment.
Event Types
gmail.email_received
The gmail.email_received event fires when an email is received in your Gmail inbox. This event provides complete email details including sender, recipients, subject, body, and attachments.
Event Type:
Fields:
content.text(string)Email body content as plain text.
content.contentType(ContentType)Always
'email'for Gmail messages.actor.id(string)Sender's email address.
actor.name(string)Sender's display name or email if no name available.
context.channelId(string)Gmail thread ID.
context.channelType(ChannelType)Always
'email_thread'.gmail.messageId(string)Unique Gmail message ID. Use this for operations like adding labels or replying.
gmail.threadId(string)Gmail conversation thread ID. All emails in a conversation share the same thread ID.
gmail.subject(string)Email subject line. Empty string if no subject.
gmail.from(EmailAddress)Sender email address with optional display name.
Field Type Description from.emailstring Sender's email address from.namestring | null Sender's display name gmail.to(EmailAddress[])Array of primary recipients. Empty array if none.
gmail.cc(EmailAddress[])Array of CC recipients. Empty array if none.
gmail.bcc(EmailAddress[])Array of BCC recipients. Empty array if none (usually unavailable).
gmail.date(Date)When the email was sent.
gmail.hasAttachments(boolean)True if the email has file attachments.
gmail.labels(string[])Array of Gmail labels applied to this message (e.g.,
["INBOX", "IMPORTANT", "UNREAD"]).gmail.isUnread(boolean)True if the email is unread.
enrichment(EventEnrichment | null)Content enrichment including detected tickers, companies, and sentiment. Null until processing completes.
Example - Auto-Label Important Emails:
Example - Email Digest to Telegram:
Example - Invoice Tracker:
Subscription Examples:
Common Use Cases
Email to Task Converter
Newsletter Organizer
Email Backup
Smart Reply Suggestion
See Also
- Events Overview - Event system architecture
- Telegram Events - Telegram automation
- Calendar Events - Calendar integration
- Resources - Gmail adapter API