delete_label
Delete a Gmail label or an Outlook category from a mailbox. In Gmail, the label is removed from its messages, which stay in the mailbox, and a label with nested labels can't be deleted until they are. Gmail system labels such as Inbox and Starred can't be deleted. In Outlook, the category leaves the mailbox's category list, but messages that have it keep its name. Call list_labels first to find the label ID.
Delete a Gmail label or an Outlook category from a mailbox. In Gmail, the label is removed from its messages, which stay in the mailbox, and a label with nested labels can't be deleted until they are. Gmail system labels such as Inbox and Starred can't be deleted. In Outlook, the category leaves the mailbox's category list, but messages that have it keep its name. Call list_labels first to find the label ID.
Permissions
Required capabilities: mail.organize.
Inputs
| Name | Required | Type | Details |
|---|---|---|---|
accountId | No | string or null | Account to operate on. Optional when exactly one account is connected. Minimum length: 1. Maximum length: 512. |
label | Yes | string | ID of the label or category to delete, as list_labels returns it, or its name. Minimum length: 1. Maximum length: 512. |
{
"type": "object",
"properties": {
"accountId": {
"description": "Account to operate on. Optional when exactly one account is connected.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 512
},
{
"type": "null"
}
]
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 512,
"description": "ID of the label or category to delete, as list_labels returns it, or its name."
}
},
"required": [
"label"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}Last updated
delete_folder
Delete an empty folder from a mailbox. The folder must have no messages and no subfolders: move or trash its mail and delete its subfolders first. In Gmail, where the folder is a label, remove the label from its messages. System folders such as Inbox, Sent and Trash can't be deleted, and neither can a folder the account settings use as one. Call list_folders first to find the folder ID.
download_attachment
Get metadata and a resource link for one attachment. With inline, the result also includes the content. For a PDF, inline adds extracted text, and pages returns the text of a page range such as 201-400. The size limit is 10 MB. To keep an attachment as a file, or to get one over the limit, save it with save_attachment.