Actions30
- Message Actions
- Label Actions
- Draft Actions
- Thread Actions
Message → Move a Message
AI-generatedSummary
Move a message from one label to another by updating its mailbox assignments.
Inputs
- messageId (required) — The ID of the message to move.
- sourceLabelIdForMove (required) — The label (mailbox) to remove the message from. Populated via the getLabels loadOptions method.
- targetLabelIdForMove (required) — The label (mailbox) to add the message to. Populated via the getLabels loadOptions method.
- fetchOptions — Optional settings such as enabling debug output (includes before/after message state).
Output shape
Returns an object with action, messageId, sourceLabelId, targetLabelId, successful boolean, and optional debug info (before/after). Also includes pairedItem metadata.
When debug is enabled via fetchOptions.debug, the output includes a debug object containing before and after message snapshots.