Folders & Labels
folderList, create, rename, or delete email labels in your mailbox. Manage Gmail labels and IMAP folders.
Instructions
Manage mailbox folders, which are labels on Gmail: the arguments say 'folder' for cross-provider compatibility, but Gmail returns and manages labels (type: 'label'). 'list' needs read:email, the rest manage:folders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of the new folder or label. | |
| inbox | No | Inbox email address; an alternative to inbox_id, which wins when both are given. | |
| action | Yes | Operation to run. list = every folder with its id and message counts; create = a folder called `name`; rename = folder_id to new_name; delete = folder_id, irreversibly. | |
| inbox_id | No | Inbox UUID. Optional when the key has exactly one inbox. Otherwise pass this or `inbox`; omit both and the error lists every inbox_id. | |
| new_name | No | New display name. | |
| folder_id | No | Folder id from action: list. On IMAP this is the mailbox name (e.g. 'INBOX/Work'), on Gmail the label id. |