Skip to main content
gmail.trashMessages moves messages to Trash, where they remain recoverable while Gmail retains them.

Example

Trash newly received messages with a known test marker:

Inputs

Inputs accept compatible signals.

Output

Returns a Signal<Array<{ messageId: string; threadId: string; historyId?: string; labelIds: string[] }>> with each message’s updated metadata in input order.
Trashing is not permanent deletion, but Gmail can permanently delete retained Trash contents. gmail.untrashMessages can restore a message only while Gmail still has it.
The action operates on individual message IDs. Trashing one message doesn’t explicitly trash every message in its thread.