Create Draft
gmail.create_draft
ActionEmailconnection required
Calls the Gmail API drafts.create with an RFC 822 message.
Save an email as a Gmail draft (optionally inside an existing thread).
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Gmail
- Secret shape
- {"client_id", "client_secret", "refresh_token"}
- Resolved by
- config.connection_id, else node.connection_id
Configuration
13 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
to Recipients (comma-separated or a list). Supports {{ }}. | string | Yes | — | — | — |
cc Cc recipients (comma-separated or a list). | string | No | — | — | — |
bcc Bcc recipients (comma-separated or a list). | string | No | — | — | — |
subject Subject line. | string | No | — | — | — |
body_text Plain-text body. | string | No | — | — | — |
body_html HTML body; blank leaves it out of the call. | string | No | — | — | — |
from_email Send as this address (an alias). | string | No | — | email format | — |
from_name Display name shown as the sender. | string | No | — | — | — |
reply_to Reply-To address. | string | No | — | — | — |
thread_id Put the draft in this thread (e.g. {{ $steps.trigger.thread_id }}). | string | No | — | — | — |
in_reply_to RFC Message-ID being answered, e.g. {{ $steps.trigger.rfc_message_id }}. | string | No | — | — | — |
references RFC References header. | string | No | — | — | — |
attachments Files to attach — the envelope every file-producing node emits ({filename, content_type, file_content, content_encoding}). Accepts one object or a list, e.g. {{ $steps.get_invoice }}. Each file counts against MANTLE_BINARY_MAX_BYTES. | array | No | — | array of object | — |
Output
One shape.
draft
| Field | Type | Example |
|---|---|---|
ok | boolean | — |
draft_id Id of the saved draft. | string | — |
message_id Gmail id of the draft's message. | string | — |
thread_id | string | — |
to | array | — |
subject | string | — |
{
"draft_id": "",
"message_id": "",
"ok": false,
"subject": "",
"thread_id": "",
"to": []
}Templates that use Gmail
Solutions with Gmail
See Create Draft run in a workflow.
In a technical demo we add the Gmail connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.