search_emails from yesterday finds invoice threads. Today you write one. But before automating send, you always draft first — review the content, confirm the recipient, then promote to send. The draft action is your confirmation checkpoint.
Create a draft in my Gmail Drafts folder. Then I can review it and delete it or send it manually if the automation behaves unexpectedly.
Exactly the right instinct. GMAIL_CREATE_EMAIL_DRAFT takes to, subject, and body and places the email in your Drafts folder — nothing leaves your account until you promote it. The fields match the send action exactly, so the transition from draft to send tomorrow is one word change:
result = toolset.execute_action(
Action.GMAIL_CREATE_EMAIL_DRAFT,
{"to": "client@acme.com", "subject": "Invoice — April 2026 — Acme", "body": "Hi, please find your April invoice attached."}
)
print(result.get("id", "draft created"))The body is just a plain string? No HTML formatting required?
Plain text is fine for the API. Gmail renders it as plain text in the email. If you need HTML — bullet lists, bold amounts — pass body as an HTML string. But for invoice emails, plain text with clear line breaks is professional and unambiguous.
I can draft six invoice emails in a loop, review them all in Drafts, and send with one click instead of drafting six times manually.
Review in Drafts, send in bulk. The send-to-self safety pattern applies here too — test with your own address before pointing it at six client inboxes:
def draft_email(to: str, subject: str, body: str) -> dict:
result = toolset.execute_action(
Action.GMAIL_CREATE_EMAIL_DRAFT,
{"to": to, "subject": subject, "body": body}
)
print(f"Draft created: {result.get('id', 'ok')}")
return resultMy monthly invoice draft ritual — six emails, six copies of the same text — is now a loop.
Always pair write actions with a confirmation step. Draft first, inspect, then promote. The habit saves you from sending the wrong rate to the wrong client.
GMAIL_CREATE_EMAIL_DRAFT stores a draft in Gmail without sending it. This is the safe way to prepare emails before committing:
result = toolset.execute_action(
action=Action.GMAIL_CREATE_EMAIL_DRAFT,
params={'to': 'client@example.com', 'subject': 'Invoice April 2026', 'body': 'Hi...'}
)The draft workflow lets you review the email in Gmail before sending — important for client-facing messages. The response dict includes a draftId you can later use to send, update, or delete the draft.
Why draft before send? Drafts are reversible; sends are not. For automated workflows touching real clients, always build and test the draft step first.
search_emails from yesterday finds invoice threads. Today you write one. But before automating send, you always draft first — review the content, confirm the recipient, then promote to send. The draft action is your confirmation checkpoint.
Create a draft in my Gmail Drafts folder. Then I can review it and delete it or send it manually if the automation behaves unexpectedly.
Exactly the right instinct. GMAIL_CREATE_EMAIL_DRAFT takes to, subject, and body and places the email in your Drafts folder — nothing leaves your account until you promote it. The fields match the send action exactly, so the transition from draft to send tomorrow is one word change:
result = toolset.execute_action(
Action.GMAIL_CREATE_EMAIL_DRAFT,
{"to": "client@acme.com", "subject": "Invoice — April 2026 — Acme", "body": "Hi, please find your April invoice attached."}
)
print(result.get("id", "draft created"))The body is just a plain string? No HTML formatting required?
Plain text is fine for the API. Gmail renders it as plain text in the email. If you need HTML — bullet lists, bold amounts — pass body as an HTML string. But for invoice emails, plain text with clear line breaks is professional and unambiguous.
I can draft six invoice emails in a loop, review them all in Drafts, and send with one click instead of drafting six times manually.
Review in Drafts, send in bulk. The send-to-self safety pattern applies here too — test with your own address before pointing it at six client inboxes:
def draft_email(to: str, subject: str, body: str) -> dict:
result = toolset.execute_action(
Action.GMAIL_CREATE_EMAIL_DRAFT,
{"to": to, "subject": subject, "body": body}
)
print(f"Draft created: {result.get('id', 'ok')}")
return resultMy monthly invoice draft ritual — six emails, six copies of the same text — is now a loop.
Always pair write actions with a confirmation step. Draft first, inspect, then promote. The habit saves you from sending the wrong rate to the wrong client.
GMAIL_CREATE_EMAIL_DRAFT stores a draft in Gmail without sending it. This is the safe way to prepare emails before committing:
result = toolset.execute_action(
action=Action.GMAIL_CREATE_EMAIL_DRAFT,
params={'to': 'client@example.com', 'subject': 'Invoice April 2026', 'body': 'Hi...'}
)The draft workflow lets you review the email in Gmail before sending — important for client-facing messages. The response dict includes a draftId you can later use to send, update, or delete the draft.
Why draft before send? Drafts are reversible; sends are not. For automated workflows touching real clients, always build and test the draft step first.
Create a free account to get started. Paid plans unlock all tracks.