Skip to main content
deleteDraft permanently removes an unsent draft from Gmail. Use it to discard a draft that should never be sent.

Example

automations/delete-expired-draft.automation.ts

Inputs

Every input, including account, also accepts a compatible Signal.
Gmail does not provide a way to restore a draft deleted by this action. Pass the draftId returned by a draft action, not the draft’s messageId.
The action fails if the draft was already sent or deleted, or belongs to a different connected account.

Output

The action returns the deleted draftId as a Signal<string>. This lets a later action record exactly which draft was removed.