markAsSpam adds Gmail’s SPAM system label and removes INBOX in one request. Use it when your automation has positively identified unwanted mail.
Example
Move newly received messages with a known unwanted subject marker to Spam:Inputs
Every input field also accepts a compatible
Signal; the example passes the filtered message ID signal directly.
Output
The action returns aSignal<string[]> containing the modified message IDs in input order.
This action requests both state changes together: add SPAM and remove INBOX. It does not delete the messages or remove unrelated labels. Use markAsNotSpam to reverse these two mailbox changes.