Microsoft 365 Create Email Folder
m365_create_email_folderUse this when the user wants a new mail folder in their Microsoft 365 / Outlook account: it is created on the Exchange server, so Outlook shows it on every device. name is the new folder's name; parent (optional) puts it inside an existing folder — an id, name or path from m365_list_email_folders, or inbox. If a folder with that name (in any case) already exists under the same parent, nothing is created and the answer is exists=true with its id. Answers created=true only after Microsoft 365 returns the new folder on a second read. Needs the Microsoft 365 permission Mail.ReadWrite: an account connected before it was asked for answers consent_required until it is connected again. For a folder of an account in the Mac's Mail app, use create_email_folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The new folder's name: one line, without /, at most 255 characters. | |
| parent | No | Folder to create it in: an id, name or path from m365_list_email_folders, or inbox. Leave it out for a top-level folder. | |
| account | No | Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account. | |
| confirm | No | Ignored; kept for older clients. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| name | Yes | ||
| path | No | ||
| exists | No | ||
| status | Yes | ||
| account | No | The email (UPN) of the Microsoft 365 account this call used. | |
| created | Yes | ||
| message | No | ||
| parent_id | No |