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

# Send Email

> Send a plain-text or HTML email from a connected Gmail account.

The **Send Email** action sends a new message from a connected Google account.
It supports multiple recipients, CC addresses, HTML bodies, and file
attachments.

## Quick start

<Steps>
  <Step title="Connect Gmail">
    Choose the Google account that should appear as the sender.
  </Step>

  <Step title="Add recipients">
    Add at least one **Recipients** item. Add **CC** items only when needed.
  </Step>

  <Step title="Write the message">
    Set **Subject** and **Body**, then choose **Plain Text** or **HTML** for
    **Body Type**.
  </Step>

  <Step title="Use the IDs">
    Store **Message ID** for message actions or **Thread ID** for thread-level
    replies.
  </Step>
</Steps>

## Inputs

| Input                   | Type                   | Required | Description                                          |
| ----------------------- | ---------------------- | -------- | ---------------------------------------------------- |
| **Third-party account** | Google account         | Yes      | Gmail account that sends the message.                |
| **Recipients**          | List of email strings  | Yes      | One or more `To` addresses.                          |
| **CC**                  | List of email strings  | No       | Carbon-copy recipients.                              |
| **Subject**             | String                 | Yes      | Message subject.                                     |
| **Body**                | String                 | Yes      | Plain-text or HTML message content.                  |
| **Body Type**           | `Plain Text` or `HTML` | No       | How the body is encoded. Defaults to **Plain Text**. |
| **Attachments**         | List of files          | No       | Files attached with their filename and content type. |

<Warning>
  When **Body Type** is **HTML**, the body is sent as HTML. Escape or sanitize
  untrusted values before inserting them into markup.
</Warning>

## Outputs

| Output         | Type   | Description                                          |
| -------------- | ------ | ---------------------------------------------------- |
| **Message ID** | String | Gmail ID of the sent message.                        |
| **Thread ID**  | String | Gmail ID of the conversation containing the message. |

## Example: send a generated report

```text theme={null}
Create report file
  → Gmail: Send Email
      Recipients = project subscribers
      Body Type = HTML
      Attachments = report file
  → Store Message ID
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="A recipient is rejected">
    Each recipient and CC value must be a valid email address. Put each address
    in its own list item.
  </Accordion>

  <Accordion title="HTML appears as visible markup">
    Set **Body Type** to **HTML**. The default is plain text.
  </Accordion>
</AccordionGroup>
