untrash restores one or many messages using Gmail’s dedicated untrash operation. Use it to recover messages that are still present in Trash.
Example
Restore up to 100 trashed messages from a trusted sender:Inputs
Every input field also accepts a compatible
Signal; the example derives message IDs from searchMessages.
Output
The action returns aSignal<Array<{ messageId: string; threadId: string; historyId?: string; labelIds: string[] }>> with Gmail’s updated metadata for every message, in input order.
The returned
labelIds are the source of truth for the message’s placement after Gmail restores it. The action cannot recover a message that Gmail has already deleted permanently.