Move all emails
Move every email in a folder that matches the optional filters to another folder.
Command in the Microsoft 365 toolkit · id ooa.microsoft365/move_all_mail · 12 inputs (1 required), 1 output
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Access token | Credential | No | Microsoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token. | |
| To folder | String | Yes | Destination folder id, well-known name, or a path such as Inbox/Invoices/2026. | |
| Folder | String | No | inbox | Source Folder id or well-known name: inbox, archive, sentitems, deleteditems. |
| Unread only | Boolean | No | false | Only unread emails. |
| From contains | String | No | Sender contains this text; separate several with ; to match any of them. | |
| Subject contains | String | No | Subject contains this text; separate several with ; to match any of them. | |
| Maximum results | Number | No | 1000 | Most emails to move in one run. |
| Read only | Boolean | No | false | Only emails already read. |
| Since | DateTime | No | Received on or after this time (UTC). | |
| Before | DateTime | No | Received before this time (UTC). | |
| Mailbox | String | No | me | Mailbox: me, or a user's email address (needs application permission). |
| Endpoint address | String | No | https://graph.microsoft.com/v1.0 | Graph endpoint; change only for national clouds or testing. |
Outputs
| Output | Type | What it is |
|---|---|---|
| count | Number | Number of emails moved. |