Skip to main content
markAsNotSpam removes Gmail’s SPAM system label and adds INBOX in one request. Use it to restore messages that an automation has identified as legitimate mail.

Example

Restore up to 100 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 a Signal<string[]> containing the modified message IDs in input order. This action requests both state changes together: remove SPAM and add INBOX. Other system and user labels remain untouched. It operates on individual messages, even when Gmail displays them as a conversation.