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

# Send Email

> Automatically send generated documents via email

DocsAutomator provides flexible email automation with three service options: DocsAutomator Mail for reliable delivery, and Gmail or Outlook for sending from your own connected mailbox.

## Email Service Options

<Tabs>
  <Tab title="DocsAutomator Mail (Default)">
    * **Sender**: DocsAutomator `<noreply@docsautomator.com>`
    * **Benefits**: High deliverability, no setup required, reliable infrastructure
    * **Best for**: Business communications and automated notifications
    * **Setup**: Enabled by default with no additional configuration
  </Tab>

  <Tab title="Gmail Integration">
    * **Sender**: Your connected Gmail account
    * **Benefits**: Personal sender reputation, custom sender names, your domain
    * **Best for**: Personal communications and branded emails
    * **Requirements**: Gmail account connection via OAuth
  </Tab>

  <Tab title="Outlook Integration">
    * **Sender**: Your connected Microsoft (Outlook) account
    * **Benefits**: Personal sender reputation, custom sender names, your domain
    * **Best for**: Teams on Microsoft 365 / Outlook
    * **Requirements**: Microsoft account connection via OAuth
  </Tab>
</Tabs>

## Connecting Gmail or Outlook

<Steps>
  <Step title="Select the service">
    Select Gmail or Outlook as the email service in automation settings
  </Step>

  <Step title="Authorize">
    Click "Connect Gmail Account" or "Connect Microsoft Account" to authorize DocsAutomator
  </Step>

  <Step title="Choose Account">
    Choose which connected account to send from
  </Step>

  <Step title="Custom Name (Optional)">
    Set a custom sender name to replace the default "DocsAutomator" display
  </Step>
</Steps>

<Info>
  You can connect multiple accounts and pick which one each automation uses. Connect or disconnect accounts anytime under **Workspace Settings → Integrations**.
</Info>

## Sending from the Team Member Who Generates the Document

By default, every email an automation sends comes from the one account configured in its email settings. For teams, you can instead send each email from the person who generated the document: with Gmail or Outlook selected as the email service, enable **Send from the team member who generates the document** below the account selector.

When enabled:

* DocsAutomator matches the generating member's login email against the Gmail and Outlook accounts connected to the workspace
* If a matching account is found, the email is sent from that member's account
* If there is no match, or the document was generated by an automated trigger (auto-creation, webhooks, polling), the email falls back to the account configured in the automation

The same option is available for e-signature emails in the [e-sign email settings](/features/docsautomator-esign#email-configuration), covering invitations, reminders, and completion emails.

<Info>
  Each team member who should send from their own mailbox needs their Gmail or Outlook account connected to the workspace under **Workspace Settings → Integrations**.
</Info>

### Generating via API

The in-app Generate button identifies the generating member automatically. API calls can name the member with the `actingUserEmail` parameter, passed in the request body, as a query parameter, or as an `X-Acting-User-Email` header. For example, for a Google Sheets automation:

```bash theme={null}
curl -X POST https://api.docsautomator.co/createDocument \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "docId": "YOUR_AUTOMATION_ID",
    "rowNumber": 2,
    "actingUserEmail": "member@yourcompany.com"
  }'
```

This also works in per-row generate links and button fields: append `&actingUserEmail=member@yourcompany.com` to the generation URL. See the [API reference](/api-reference/documents/create-from-api) for details.

## Email Configuration

### Recipients

* Static emails entered directly
* Dynamic emails using placeholders like `{{email}}` or `{{contact_email}}`
* Add as many recipients as you need

When you add more than one recipient, everyone receives **one shared email** rather than a separate copy each. All addresses are placed on the **To** line of a single message, so recipients can see each other, just like an email you'd send with several people in the To field.

* If a placeholder recipient resolves to an empty or invalid address, it is skipped and the email is still sent to the remaining valid recipients.
* Duplicate addresses are removed automatically, so no one is emailed twice.

### Subject Line

* Static text entered directly
* Dynamic content using placeholders
* Example: `Invoice #{{invoice_number}} for {{client_name}}`

### Email Content

* Rich text editor for formatting
* Dynamic placeholders throughout email body
* Access to document data dynamically

### Attachments

* **PDF**: Included by default. Deselect "Attach Generated PDF to Email" to send notification emails with download links instead.
* **Word document (.docx)**: For automations that use a Word template, enable "Attach Generated Word document (.docx)" to attach the editable Word file. This works on its own, so you can email the Word file without also saving a copy to storage. Enable both options to send the PDF and the Word file in the same email.

<Info>
  The Word attachment option appears only for automations built on a Word (.docx) template. It is not shown for PDF or Google Docs templates.
</Info>

### Reply-To Address

* Optional address that replies are routed to, instead of the default sender
* Works with DocsAutomator Mail, Gmail, and Outlook
* Leave blank to keep the default reply behavior

## Email Personalization

All placeholders from your document template are available in your email subject line and body. This means you can personalize every email with data from your data source.

### Using Placeholders in Emails

Any placeholder mapped in your automation can be used in:

* **Recipient field**: `{{client_email}}` or `{{contact_email}}`
* **Subject line**: `Invoice #{{invoice_number}} for {{client_name}}`
* **Email body**: `Hi {{first_name}}, please find your document attached.`

### Using Data That Shouldn't Appear in the Document

Sometimes you need data for email personalization that shouldn't be visible in the generated document. For example, you may want to route emails to different recipients or personalize the greeting, but that information isn't part of the document itself.

Use the **Always hide** option to pass data through your automation without rendering it in the document:

<Steps>
  <Step title="Add the placeholder to your template">
    Add the placeholder (e.g. `{{recipient_email}}` or `{{first_name}}`) anywhere in your Google Doc template. The end of the document works well.
  </Step>

  <Step title="Enable Always Hide">
    In your automation's placeholder settings, click the gear icon next to the placeholder and toggle on "Always hide".
  </Step>

  <Step title="Use in email settings">
    Reference the placeholder in your email recipient, subject, or body fields. The value will be used for the email but won't appear in the generated document.
  </Step>
</Steps>

<Tip>
  This is especially useful for multi-recipient workflows where different documents go to different people, or when you need personalization data (like a first name for the greeting) that isn't part of the document content.

  Learn more about this feature in the [Hidden Values](/features/advanced-placeholder-options/hidden-values) documentation.
</Tip>

## Conditional Email Sending

Send emails only when specific conditions are met based on document data.

### Setting Up Conditions

<Steps>
  <Step title="Open Conditions">
    Click the conditions icon in email settings
  </Step>

  <Step title="Add Condition">
    Add conditions using format: `if {{placeholder}} [condition] value`
  </Step>

  <Step title="Configure Logic">
    Multiple conditions use OR logic (email sends if ANY condition is met)
  </Step>
</Steps>

### Available Conditions

| Condition        | Description                |
| ---------------- | -------------------------- |
| equals           | Exact match                |
| does not equal   | Not equal to value         |
| contains         | Contains substring         |
| does not contain | Does not contain substring |

## Test Email Feature

<Tip>
  Before going live, test your email configuration:

  1. Click "Send Test Email" in email settings
  2. Enter a recipient email address
  3. Review the sample with your configured subject, content, and attachment
</Tip>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Gmail or Outlook Issues">
    * **"Account inactive"**: Reconnect the account under workspace settings > integrations (it can go inactive if access was revoked on the provider's side)
    * **"No account selected"**: Choose a connected account in email service settings
    * **Authentication errors**: Re-authorize the connection in workspace settings > integrations
    * **Outlook "Access is denied" when sending**: This appears on Outlook accounts connected before the large-attachment update, when the document being sent is larger than about 3 MB. Reconnect your Microsoft account under workspace settings > integrations to grant the added mailbox permission, then run the automation again.
  </Accordion>

  <Accordion title="Delivery Issues">
    * Check spam folders and verify recipient addresses
    * Contact support for DocsAutomator Mail delivery investigation
    * Personal Gmail accounts have daily sending limits
  </Accordion>

  <Accordion title="Common Errors">
    * **Invalid email format**: Ensure placeholder values contain valid email addresses
    * **Missing placeholders**: Verify all placeholders exist in your document template
    * **Condition errors**: Check that condition placeholders have values in your data
  </Accordion>
</AccordionGroup>
