onGmailEmailSent subscribes an automation to messages sent from the connected Gmail mailbox. Use it to record outbound conversations or continue work after a person sends a message.
The trigger emits the same fully parsed message shape as Get message, including headers, MIME bodies, labels, and attachment File objects.
Example
automations/track-sent-email.automation.ts
Options
You can call
onGmailEmailSent() without an options object. The account selection must be static: a Signal cannot choose which mailbox to watch at runtime.
Trigger data
Returns aSignal<Message> for each qualifying message. See Get message for the complete Message shape.
Behavior
- Only messages newly added to Gmail’s
SENTcollection qualify. Existing sent messages are not replayed when you deploy the trigger. - The parsed
from.addressmust match the watched mailbox. A different send-as alias does not qualify. - Messages carrying Automate.ax’s outbound marker are excluded to prevent recursive automation loops.
- Gmail message IDs provide idempotency, so repeated notifications for the same sent message do not create duplicate events.