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.

FieldTypeRequiredDefaultConstraintsExample
to
Recipients (comma-separated or a list). Supports {{ }}.
stringYes———
cc
Cc recipients (comma-separated or a list).
stringNo———
bcc
Bcc recipients (comma-separated or a list).
stringNo———
subject
Subject line.
stringNo———
body_text
Plain-text body.
stringNo———
body_html
HTML body; blank leaves it out of the call.
stringNo———
from_email
Send as this address (an alias).
stringNo—email format—
from_name
Display name shown as the sender.
stringNo———
reply_to
Reply-To address.
stringNo———
thread_id
Put the draft in this thread (e.g. {{ $steps.trigger.thread_id }}).
stringNo———
in_reply_to
RFC Message-ID being answered, e.g. {{ $steps.trigger.rfc_message_id }}.
stringNo———
references
RFC References header.
stringNo———
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.
arrayNo—array of object—

Output

One shape.

draft

FieldTypeExample
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": []
}

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.