gmail.onLabelAdded handles user and system label additions in the connected mailbox.
Example
automations/prioritize-customer-email.automation.ts
Options
The watched account can’t change at runtime. Call
gmail.onLabelAdded() without options to use the project binding.
Trigger data
ReturnsSignal<GmailLabelChange> for each Gmail history change:
message contains the same parsed fields as Get message. One event can contain several labels from the same Gmail history change. Use labelId as the stable identity. name is the current label name when available.