create_draft
Create a draft in the mailbox. With replyToMessageId, the draft is a reply: recipients and a subject left out come from the original message, replyAll includes all of its recipients, and the original message is quoted below the body unless quoteOriginal is false.
Create a draft in the mailbox. With replyToMessageId, the draft is a reply: recipients and a subject left out come from the original message, replyAll includes all of its recipients, and the original message is quoted below the body unless quoteOriginal is false.
Permissions
Required capabilities: mail.drafts.
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. |
from | No | string or null | Connected address or an available send-as address Format: email. |
to | No | array of string or null | Recipients, each "Name a@x.com" or "a@x.com" |
cc | No | array of string or null | Recipients, each "Name a@x.com" or "a@x.com" |
bcc | No | array of string or null | Recipients, each "Name a@x.com" or "a@x.com" |
subject | No | string or null | Defaults to "Re: ..." when replying Maximum length: 998. |
bodyText | No | string or null | Plain-text body. Line breaks appear in the sent email. Keep each prose paragraph on one continuous line and separate paragraphs with blank lines. |
bodyHtml | No | string or null | HTML body |
replyToMessageId | No | string or null | Message being replied to; threads correctly, quotes it below the body and computes recipients if "to" is omitted. To continue a conversation, reply to the first message get_thread returns with order newest Minimum length: 1. Maximum length: 512. |
replyAll | No | boolean or null | With replyToMessageId: reply to all original recipients |
timeZone | No | string or null | With replyToMessageId: IANA time zone, such as America/New_York, for the date above the quoted message. Defaults to the time zone setting. Minimum length: 1. Maximum length: 100. |
quoteOriginal | No | boolean or null | With replyToMessageId: set to false to leave the original message out of the reply. Defaults to true. |
attachments | No | array of object or null | None |
attachmentFiles | No | array of object or null | Files to attach from the attachment folder, read by Fluxmail instead of sent as base64. Prefer this to attachments for files on this computer. They are added to the attachments. |
{
"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"
}
]
},
"from": {
"description": "Connected address or an available send-as address",
"anyOf": [
{
"type": "string",
"format": "email"
},
{
"type": "null"
}
]
},
"to": {
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\"",
"anyOf": [
{
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
},
{
"type": "null"
}
]
},
"cc": {
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\"",
"anyOf": [
{
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
},
{
"type": "null"
}
]
},
"bcc": {
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\"",
"anyOf": [
{
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"description": "Recipients, each \"Name <a@x.com>\" or \"a@x.com\""
},
{
"type": "null"
}
]
},
"subject": {
"description": "Defaults to \"Re: ...\" when replying",
"anyOf": [
{
"type": "string",
"maxLength": 998
},
{
"type": "null"
}
]
},
"bodyText": {
"description": "Plain-text body. Line breaks appear in the sent email. Keep each prose paragraph on one continuous line and separate paragraphs with blank lines.",
"type": [
"string",
"null"
]
},
"bodyHtml": {
"description": "HTML body",
"type": [
"string",
"null"
]
},
"replyToMessageId": {
"description": "Message being replied to; threads correctly, quotes it below the body and computes recipients if \"to\" is omitted. To continue a conversation, reply to the first message get_thread returns with order newest",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 512
},
{
"type": "null"
}
]
},
"replyAll": {
"description": "With replyToMessageId: reply to all original recipients",
"type": [
"boolean",
"null"
]
},
"timeZone": {
"description": "With replyToMessageId: IANA time zone, such as America/New_York, for the date above the quoted message. Defaults to the time zone setting.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 100
},
{
"type": "null"
}
]
},
"quoteOriginal": {
"description": "With replyToMessageId: set to false to leave the original message out of the reply. Defaults to true.",
"type": [
"boolean",
"null"
]
},
"attachments": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"filename": {
"description": "Required with content",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"mimeType": {
"description": "Required with content",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"content": {
"description": "base64",
"type": "string"
},
"contentId": {
"description": "With content: Content-ID for an inline image, referenced from bodyHtml as cid:<contentId>",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"disposition": {
"description": "With content: defaults to attachment",
"type": "string",
"enum": [
"inline",
"attachment"
]
},
"messageId": {
"description": "Instead of content: a message in this mailbox with the attachment to include. Requires mail.read",
"type": "string",
"minLength": 1,
"maxLength": 512
},
"attachmentId": {
"description": "With messageId: the attachment ID from get_email",
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"additionalProperties": false,
"description": "Give content with a filename and mimeType, or messageId and attachmentId"
}
},
{
"type": "null"
}
]
},
"attachmentFiles": {
"description": "Files to attach from the attachment folder, read by Fluxmail instead of sent as base64. Prefer this to attachments for files on this computer. They are added to the attachments.",
"anyOf": [
{
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"description": "Path relative to the attachment folder"
},
"filename": {
"description": "Defaults to the file name",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"mimeType": {
"description": "Defaults to the type for the file extension",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"contentId": {
"description": "Content-ID for an inline image, referenced from bodyHtml as cid:<contentId>",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"disposition": {
"description": "Defaults to attachment",
"type": "string",
"enum": [
"inline",
"attachment"
]
}
},
"required": [
"path"
],
"additionalProperties": false
}
},
{
"type": "null"
}
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}Last updated
cancel_scheduled_email
Cancel a pending scheduled send by its scheduleId. The draft stays in the Drafts folder, so the content is not lost. Get the scheduleId from send_email or forward_email with sendAt, or from list_scheduled_emails.
create_folder
Create a folder in a mailbox. For a subfolder, give the full path with the separator the mailbox already uses in its folder names, such as Projects/2026. Missing parent folders are created too. If the folder already exists, it is returned unchanged. System folder names, including Inbox, Sent and Trash, are rejected. In Gmail, the folder is a label. Call list_folders first to see how the mailbox writes folder paths.