Skip to main content
deleteLabel permanently deletes a user-owned Gmail label. The messages and threads that carried the label remain in the mailbox; only the label is removed. Use an immutable label ID when possible. Display names are resolved case-insensitively against the connected mailbox.

Example

automations/delete-old-label.automation.ts

Inputs

Each input can also be a compatible Signal from an earlier trigger or action.

Output

Returns a Signal<string> containing the immutable ID of the deleted label.
Deletion cannot be undone. Gmail system labels such as INBOX, SPAM, and TRASH cannot be deleted.
The action fails before deletion when no label in the connected mailbox matches the supplied name or ID.