Vettero

Mail Received

Run when Gmail delivers mail for a connected mailbox and labels.

Type

google.gmail.on-mail
Messaging
ServiceRequired

Google

CapabilityRequired

Gmail

Listed only when a matching connected service is enabled.

Mail Received runs when Gmail push notifications arrive for the configured mailbox.

Payload

FieldTypeDescription
serviceIdstringConnected Google service with Gmail enabled
labelIdsstringLabels to watch. Default: ["INBOX"]

Trigger data

Available as args.*.

FieldTypeDescription
message.idstringGmail message id
message.threadIdstringThread id
message.labelIdsstringMessage labels
message.snippetstringSnippet
message.internalDatestringInternal date
message.subjectstringSubject
message.from.namestringFrom name
message.from.emailstringFrom email
message.to[].namestringTo name
message.to[].emailstringTo email
message.cc[].namestringCc name
message.cc[].emailstringCc email
message.bcc[].namestringBcc name
message.bcc[].emailstringBcc email
message.replyTo.namestringReply-to name
message.replyTo.emailstringReply-to email
message.messageIdstringMessage-ID header
message.inReplyTostringIn-Reply-To header
message.referencesstringReferences header
message.isReplybooleanWhether the message is a reply
message.dateHeaderstringDate header
message.textPlainstringPlain-text body
message.textHtmlstringHTML body
message.textParsedstringParsed body
message.attachments[].filenamestringAttachment filename
message.attachments[].mimeTypestringAttachment MIME type
message.attachments[].sizenumberAttachment size
message.attachments[].attachmentIdstringAttachment id
rawobjectOriginal Gmail push payload

Use case

  • Inbound support or sales mail should create or update a table row, classify with an AI Field or agent, then notify — without opening a live chat.
  • Watch INBOX or other labels (for example only support@) so personal mail does not fire the handler.
  • Store threadId on a Gmail Thread column so later replies stay on the same conversation in Gmail.
  • Use Get Attachment when inbound mail includes files you need in workspace storage.
  • Use Mail Chat instead when a person should talk to a default agent over email.

Channels vs handlers

Mail handlers share identifiers with Mail Chat.

If an active channel uses the same mailbox, inbound mail goes to the channel. The event handler does not run for that mailbox until you disable or change the channel, or change the handler identifier.
Copyright © 2026