> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Gmail: Create Draft

Create a draft email in Gmail for later review and sending. Use this when you want to prepare emails that need human approval before sending. Ideal for: scheduled communications, review workflows, template-based emails.

![Gmail: Create Draft logo](https://ai-icon.b3.fun/logo/gmail)
Catalog action Integrations pipedream:gmail

Create a draft email in Gmail for later review and sending. Use this when you want to prepare emails that need human approval before sending. Ideal for: scheduled communications, review workflows, template-based emails.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `gmail-create-draft` |
| Category | Integrations |
| Connector | `pipedream:gmail` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `pipedream`, `integration`, `oauth`, `gmail`, `email`, `draft`, `write`, `review`, `approval` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `to` | `string` | Yes | Recipient email address \(e.g., user@example.com\) |
| `subject` | `string` | Yes | Email subject line |
| `body` | `string` | Yes | Email body content \(supports HTML\) |
| `cc` | `string` | No | CC email addresses \(comma-separated\) |
| `bcc` | `string` | No | BCC email addresses \(comma-separated\) |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | `boolean` | Yes | Whether the draft was created successfully |
| `data` | `object` | No | Gmail API response data |
| `exports` | `object` | No | Exported values from the action |

## Examples

**Workflow node**

```json
{
  "type": "gmail-create-draft",
  "payload": {
    "to": "example-to",
    "subject": "example-subject",
    "body": "example-body"
  },
  "children": [],
  "connector": {
    "type": "pipedream:gmail",
    "id": "conn_pipedream_gmail"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/gmail-create-draft/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "to": "example-to",
    "subject": "example-subject",
    "body": "example-body"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.