email.received, for
every message from outside the workspace that arrives in a connected mailbox in a
thread that is a conversation.
Payload
string
required
The mail provider’s id for the message. The same value the matching
email.received carries. Always present.string
The mail provider’s id for the thread.
string
The connected mailbox the message arrived in.
string
The conversation the thread belongs to. Present on every delivery.
string
The sender’s address.
string
The sender’s display name. Omitted when the message carries none.
string[]
The addresses the message was sent to.
string[]
The addresses copied. An empty array when nobody was copied.
string
The subject line. An empty string when the message has none.
string
The message’s date, as an ISO 8601 timestamp.
string
The provider’s id for the first folder or label the message is filed under.
Omitted when the provider lists none.
string[]
Records the message is linked to. Mail from a connected mailbox does not carry
them today, so this is omitted.
When it fires
Exactly whenemail.received does: the sender is outside the workspace, the
message is not filed as spam, and the thread is a conversation. The
email.received page lists what sends
nothing.
Telling a reply from a first message
The payload does not say which one a message is. To act only on replies, keep theconversationId of every email.received or email.replied and every
email.sent you handle: a message whose
conversation you have already seen continues a thread you know about. A
conversation that began before your endpoint subscribed reads as new the first
time it appears.