Skip to main content
onGmailLabelRemoved subscribes an automation to user-label and system-label removals in the connected Gmail mailbox.

Example

automations/archive-resolved-email.automation.ts

Options

The account selection must be static. Call onGmailLabelRemoved() without an options object to use the default Google binding.

Trigger data

Returns a Signal<GmailLabelChange> with the fully parsed message and the labels removed in the same Gmail history change:
See Get message for the complete Message shape. Use labelId as the stable identity. name is omitted when Gmail can no longer resolve a removed label, such as after the user deletes that label.