Skip to main content

Gmail - Create Draft

Create draft emails in Gmail without sending them. Drafts are saved to your Gmail Drafts folder and can be edited or sent later.

Overview

The Gmail Create Draft tool creates email drafts that are saved but not sent. This is essential for preparing emails for later review, approval workflows, or AI-assisted email composition.

Key Features:

  • Create draft emails without sending
  • Supports plain text and HTML email bodies
  • Add recipients (to, cc, bcc)
  • Works with both OAuth and App Password
  • Drafts saved to Gmail Drafts folder
  • Can be edited or sent later from Gmail

Common Use Cases:

  • AI drafts email responses for human review
  • Prepare batch emails for later sending
  • Create email templates
  • Approval workflows (draft → review → send)
  • Schedule email composition

Prerequisites

Before using this tool, connect a Gmail account to Reeva:

  1. Gmail (OAuth) - Returns draft_id for reference

  2. Gmail (App Password) - Works great too

Both authentication methods work identically with Create Draft.

Using the Tool

1. Create a Create Draft Tool Instance

  1. Navigate to My Tools in Reeva
  2. Click Create New Tool
  3. Select Gmail - Create Draft from the base tools
  4. Give your tool a name (e.g., "Draft Gmail Messages")
  5. Select your connected Google Account
  6. Click Create

2. Create a Simple Draft

Create a basic draft email:

{
"to": ["recipient@example.com"],
"subject": "Q4 Planning Meeting",
"body": "Hi team,\n\nLet's schedule our Q4 planning meeting for next week.\n\nBest regards"
}

3. Create Draft with CC and BCC

Include additional recipients:

{
"to": ["recipient@example.com"],
"cc": ["manager@company.com"],
"bcc": ["archive@company.com"],
"subject": "Project Update",
"body": "Here's the weekly project update..."
}

4. Create HTML Draft

Create a draft with formatted HTML content:

{
"to": ["recipient@example.com"],
"subject": "Newsletter - December 2024",
"body": "Plain text version of newsletter",
"html_body": "<html><body><h1>Newsletter</h1><p>Check out our <strong>latest updates</strong>!</p></body></html>"
}

Gmail will display the HTML version by default, with plain text as fallback.

Tool Parameters

ParameterTypeRequiredDescription
toarrayYesList of recipient email addresses
subjectstringYesEmail subject line
bodystringYesPlain text email body
html_bodystringNoOptional HTML version of email body
ccarrayNoList of CC recipient email addresses
bccarrayNoList of BCC recipient email addresses

Parameter Details

to (required):

  • Array of email addresses
  • Must have at least one recipient
  • Example: ["user@example.com", "another@example.com"]

subject (required):

  • String, cannot be empty
  • Be descriptive and clear
  • Example: "Q4 Budget Review"

body (required):

  • Plain text email body
  • Cannot be empty
  • Supports line breaks (\n)
  • Example: "Hi team,\n\nHere's the update..."

html_body (optional):

  • HTML-formatted version
  • Gmail displays this if provided, plain text as fallback
  • Use for rich formatting, links, images
  • Example: "<p>Hi team,</p><p>Check <a href='...'>this link</a>.</p>"

cc (optional):

  • Array of CC (carbon copy) recipients
  • Recipients see other recipients
  • Example: ["manager@company.com"]

bcc (optional):

  • Array of BCC (blind carbon copy) recipients
  • Recipients don't see other BCC recipients
  • Good for privacy
  • Example: ["archive@company.com"]

Response Format

OAuth Response (with draft_id):

{
"success": true,
"draft_id": "r-1234567890123456789",
"message_id": "18d5f2a3b4c5d6e7",
"from": "sender@gmail.com",
"to": ["recipient@example.com"],
"subject": "Q4 Planning Meeting",
"message": "Draft created successfully",
"note": "Draft saved to Gmail Drafts folder. You can edit or send it from Gmail."
}

App Password Response (no draft_id):

{
"success": true,
"from": "sender@gmail.com",
"to": ["recipient@example.com"],
"subject": "Q4 Planning Meeting",
"message": "Draft created successfully via IMAP",
"note": "Draft saved to Gmail Drafts folder via IMAP. Draft ID not available with App Password authentication."
}

Response Fields

  • success: Whether draft was created successfully
  • draft_id: Gmail draft ID (OAuth only) - use to reference or update draft
  • message_id: Gmail message ID (OAuth only)
  • from: Sender email address (your Gmail)
  • to: List of recipients
  • subject: Email subject
  • message: Confirmation message
  • note: Additional information about the draft
  • cc: CC recipients (if provided)
  • bcc: BCC recipients (if provided)

OAuth vs App Password

Both authentication methods work great with Create Draft:

FeatureOAuthApp Password
Create drafts
HTML emails
CC/BCC support
Draft ID returned❌ (IMAP limitation)
Access draft later✅ Via draft_id✅ Via Gmail UI only
PerformanceFastSlightly slower (IMAP)

Recommendation: Use OAuth if you need draft_id for programmatic access. Both work perfectly for creating drafts.

Use Cases

1. AI Email Response Assistant

Workflow:
1. Read incoming email with Read Email tool
2. AI analyzes content and drafts response
3. Create Draft with AI-generated response
4. Human reviews draft in Gmail
5. Human edits if needed and sends

2. Batch Email Preparation

Workflow:
1. AI generates personalized emails for 20 customers
2. For each customer, Create Draft with their personalized content
3. Human reviews all drafts in Gmail Drafts folder
4. Send drafts individually or use Gmail's "Send All" feature

3. Email Template Creation

{
"to": ["placeholder@example.com"],
"subject": "Weekly Update - [DATE]",
"body": "[PERSONALIZED GREETING]\n\nHere are this week's highlights:\n\n[CONTENT]\n\nBest regards,\n[YOUR NAME]"
}

Create template drafts that you fill in later.

4. Approval Workflow

Workflow:
1. Junior staff member creates draft with AI assistance
2. Draft saved to Gmail
3. Manager reviews draft
4. Manager edits and approves
5. Manager sends from Gmail

5. Multi-Part Email Campaign

Workflow:
1. Create 5 drafts for email campaign sequence
2. Review all drafts together
3. Schedule sending (manually in Gmail or via third-party scheduler)

Error Handling

Missing Recipients

{
"error": "At least one recipient email address is required"
}

Cause: Empty to array

Solution: Provide at least one recipient email

Invalid Email Address

{
"error": "Invalid email address: not-an-email"
}

Cause: Malformed email address

Solution: Check email format (must be user@domain.com)

Empty Subject

{
"error": "Subject is required and cannot be empty"
}

Cause: Empty or whitespace-only subject

Solution: Provide a non-empty subject

Empty Body

{
"error": "Email body is required and cannot be empty"
}

Cause: Empty or whitespace-only body

Solution: Provide email content

IMAP Drafts Folder Error

{
"error": "Could not access Drafts folder. Ensure IMAP is enabled in Gmail settings."
}

Cause: IMAP not enabled or draft folder inaccessible

Solution:

  1. Go to Gmail Settings → Forwarding and POP/IMAP
  2. Enable IMAP access
  3. Ensure Drafts folder exists

Gmail API Error

{
"error": "Gmail API error creating draft: insufficient permission"
}

Cause: OAuth token lacks necessary permissions

Solution:

  1. Reconnect Gmail account in Reeva
  2. Ensure Gmail API is enabled in Google Cloud Console
  3. Grant all requested permissions during OAuth flow

Tips

  1. Use Plain Text + HTML: Always provide both for best compatibility

    {
    "body": "Plain text version",
    "html_body": "<p>HTML version with <strong>formatting</strong></p>"
    }
  2. Draft Organization: Use consistent subject prefixes for easy filtering

    {
    "subject": "[DRAFT] Customer Outreach - John Smith"
    }
  3. BCC for Privacy: Use BCC when sending to multiple recipients who shouldn't see each other

    {
    "to": ["you@company.com"],
    "bcc": ["customer1@example.com", "customer2@example.com"]
    }
  4. Save Draft ID: With OAuth, save draft_id for later reference

    • Update draft using Gmail API (future tool)
    • Delete draft programmatically
    • Track draft status
  5. Test Before Batch: Create one test draft first, verify formatting in Gmail, then create batch

  6. HTML Best Practices:

    • Use inline CSS (external stylesheets don't work in email)
    • Keep HTML simple (complex CSS may not render)
    • Always provide plain text fallback
    • Test in Gmail's preview

Limitations

  1. No Draft ID with App Password: IMAP doesn't return draft ID. You must access drafts through Gmail UI.

  2. No Draft Editing API: This tool creates drafts. Editing existing drafts requires separate tool (not yet implemented).

  3. No Attachments: This tool doesn't support attachments. Use Gmail UI to add attachments after draft creation.

  4. No Rich Formatting in Plain Text: Plain text body doesn't support formatting. Use html_body for formatted content.

  5. IMAP Folder Names: Some Gmail accounts in non-English locales may use different draft folder names.

Troubleshooting

Draft not appearing in Gmail

Cause: Draft created successfully but not visible yet

Solution:

  • Refresh Gmail (press F5 or Cmd+R)
  • Check "All Mail" folder
  • Search for subject line in Gmail
  • Wait a few seconds for sync

HTML not rendering correctly

Cause: Complex HTML/CSS not supported in Gmail

Solution:

  • Use inline CSS only
  • Keep HTML structure simple
  • Test with simpler HTML
  • Use Gmail's "Preview" to test

Draft created but can't find draft_id

Cause: Using App Password authentication

Solution:

  • IMAP doesn't return draft_id
  • Use OAuth if you need draft_id
  • Access draft via Gmail UI for App Password accounts

Multiple drafts created

Cause: Tool called multiple times

Solution:

  • Check API call logic
  • Implement retry logic with idempotency
  • Deduplicate drafts in Gmail manually

Support

Need help? Reach out to our support team or join our Discord community.