Preview creating a folder
preview_create_folderPreview creating a new mail folder under Folders/ and get a single-use approval token without creating anything. Confirm the folder name first, then approve to create it.
Instructions
Preview creating one new mail folder under Folders/ and return a single-use approval token; creates nothing.
Use it when the user asks for a new folder: show the name, wait for explicit approval, then call create_folder with the token. To move mail into a folder that may not exist yet, use preview_action(action="move_to_folder") with create_folder_if_missing=true in params instead, which binds creating it to the move.
name is the exact full path, such as Folders/Receipts or Folders/Work/Clients. An existing folder needs no token: the result says exists=true and there is nothing to approve. The token works once, until expires_at.
Returns name, exists, token, expires_at and action_hash. Refuses a name outside Folders/, an empty, "." or ".." part, quotes, backslashes, * or %, or over 500 characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The exact new folder name, under Folders/. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||