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

# Email Assistant

> Auto-sort, label, and answer emails so your inbox stays at zero.

<div style={{ display: 'flex', justifyContent: 'center', margin: '2rem 0' }}>
  <div className="video-card">
    <video src="https://mintcdn.com/lindyai/QWdJNkViLsD1veyH/lindy-brand-assets/pw_email_assistant.mp4?fit=max&auto=format&n=QWdJNkViLsD1veyH&q=85&s=f12f0c49813e3bc19ddd433d1231b5ba" width="600" autoPlay muted loop playsInline style={{ display: 'block', width: '100%', borderRadius: '16px' }} data-path="lindy-brand-assets/pw_email_assistant.mp4" />
  </div>
</div>

## Quick Overview

Connect your agent to Gmail or Outlook and let it:

* **Filter** incoming mail by sender, keywords, or labels
* **Categorize** messages (Marketing, Support, Colleagues, Spam, etc.)
* **Label** & tidy the inbox automatically
* **Draft** or send replies with your voice and brand tone
* **Tap** a Knowledge Base for accurate answers when needed

You can build off of both the [email triage template](https://chat.lindy.ai/home?templateId=6684857db1aa4ed9d5baa9e3) and [email responder template](https://chat.lindy.ai/home?templateId=681f0d58c7832f340735ba2d).

## Setting Up Your Email Assistant

### Step 1: Connect Your Mailbox

<Frame>
  <img src="https://mintcdn.com/lindyai/C8FfeR01UMnuv-H3/lindy-brand-assets/email-triage-auth.png?fit=max&auto=format&n=C8FfeR01UMnuv-H3&q=85&s=b6c64e52737322089178f9de85137d37" alt="Connect Gmail or Outlook" width="2014" height="910" data-path="lindy-brand-assets/email-triage-auth.png" />
</Frame>

1. Select `Gmail / Outlook – Email Received` as the trigger.
2. Complete authentication to grant read/send access.

### Step 2: Set Inbox Filters

<Frame>
  <img src="https://mintcdn.com/lindyai/C8FfeR01UMnuv-H3/lindy-brand-assets/email-triage-trigger.png?fit=max&auto=format&n=C8FfeR01UMnuv-H3&q=85&s=f33ce65e8c52dd7c30b45c79ca7189f6" alt="Trigger filters for email" width="2092" height="944" data-path="lindy-brand-assets/email-triage-trigger.png" />
</Frame>

Use `Trigger Filters` to keep processing costs tight. Examples:

* *Subject* contains "Invoice"
* *From* equals `news@` (route newsletters)
* Attachment present (flag items needing review)

## Step 3: Categorize with Conditions

<Frame>
  <img src="https://mintcdn.com/lindyai/C8FfeR01UMnuv-H3/lindy-brand-assets/email-triage-conditions.png?fit=max&auto=format&n=C8FfeR01UMnuv-H3&q=85&s=0207e2a7941e17fa553a6497a43ca976" alt="Condition for email categories" width="2296" height="1424" data-path="lindy-brand-assets/email-triage-conditions.png" />
</Frame>

Add a `Condition` step to branch emails into different paths based on their content.

Click `Add Condition` to create branches for each email type. Here are some examples:

| Condition Type | Example Setup                                                  |
| -------------- | -------------------------------------------------------------- |
| **Team**       | Prompt: "Is from a coworker (from address contains @lindy.ai)" |
| **Support**    | Prompt: "Is this a support request?"                           |
| **Marketing**  | Prompt: "Is this marketing related?"                           |
| **Spam**       | Prompt: "Is likely spam and does not need response"            |
| **Unknown**    | Prompt: "None of the above applies"                            |

You can add as many conditions as needed – each one creates a separate branch in your workflow. Feel free to customize these categories to match your business needs and email patterns.

### Step 4: Label & Organize

<Frame>
  <img src="https://mintcdn.com/lindyai/C8FfeR01UMnuv-H3/lindy-brand-assets/email-triage-label.png?fit=max&auto=format&n=C8FfeR01UMnuv-H3&q=85&s=7177f10b5d926cdf07444c71797d27b0" alt="Apply labels" width="1986" height="980" data-path="lindy-brand-assets/email-triage-label.png" />
</Frame>

For each category, drop in a `Add Label to Email` action:

| Category  | Label          |
| --------- | -------------- |
| marketing | `Marketing 📣` |
| support   | `Support 🛠`   |
| coworker  | `Team 💬`      |
| spam      | `Spam ❌`       |

### Step 5: Draft or Send Replies

<Frame>
  <img src="https://mintcdn.com/lindyai/C8FfeR01UMnuv-H3/lindy-brand-assets/email-triage-body.png?fit=max&auto=format&n=C8FfeR01UMnuv-H3&q=85&s=878075fe76c7db554923f2dc115b5ee1" alt="Reply action" width="2442" height="1700" data-path="lindy-brand-assets/email-triage-body.png" />
</Frame>

For each path you want a response, connect them to a `Send Reply` action.

Use a prompt like this in the `Body` field and adjust the adjectives to match your style:

```
Reply to this email. 

My style is : [ADJ1], [ADJ2], [ADJ3] 

Always sign off like this: [insert signature]

Be concise and actionable.
```

You can also use the signature field and add in your custom html signature.

Toggle `Save as Draft` if you want to review before sending.

<Frame>
  <img src="https://mintcdn.com/lindyai/C8FfeR01UMnuv-H3/lindy-brand-assets/email-triage-draft.png?fit=max&auto=format&n=C8FfeR01UMnuv-H3&q=85&s=c72c0a3b43353ed4dfecb8b6ecb88486" alt="Reply action" width="2150" height="1078" data-path="lindy-brand-assets/email-triage-draft.png" />
</Frame>

### Step 6: Add a Knowledge Base (Optional)

<Frame>
  <img src="https://mintcdn.com/lindyai/C8FfeR01UMnuv-H3/lindy-brand-assets/email-triage-KB.png?fit=max&auto=format&n=C8FfeR01UMnuv-H3&q=85&s=d06ef7e64d3d5170d756fa02a250d756" alt="Knowledge Base search" width="2478" height="1682" data-path="lindy-brand-assets/email-triage-KB.png" />
</Frame>

1. Attach docs (FAQ, help center, pricing guides).
2. Insert `Search Knowledge Base` before the reply action.
3. Gate replies with a `Found answer?` condition to avoid guesswork.

## Advanced Customizations

| Trick                  | What it does                                                                          |
| ---------------------- | ------------------------------------------------------------------------------------- |
| Thread Sentiment Check | Score each email's tone (angry, happy, neutral) → escalate negative threads to Slack. |
| VIP Escalation         | If `from` domain matches big-logo clients, bypass auto-reply and ping you instantly.  |
| Spam Digest            | Collect low-priority marketing mails → send one daily summary at 7 AM.                |
| Attachment OCR         | Auto-extract invoice data from PDFs and push to your accounting system.               |

## Best Practices

<AccordionGroup>
  <Accordion title="Start in Draft Mode">
    Keep `Save as Draft` on for the first week to spot issues.
  </Accordion>

  <Accordion title="Keep the KB Fresh">
    Out-of-date answers are worse than no answer; schedule monthly reviews.
  </Accordion>

  <Accordion title="Avoid Over-Automation">
    Leave sensitive/legal threads for human review.
  </Accordion>
</AccordionGroup>

## Next Steps

Now that your Email Assistant is set up, explore these complementary workflows:

<CardGroup cols={2}>
  <Card title="Gmail Integration" href="/skills/popular-integrations/gmail" icon="envelope">
    Advanced email automation and workflows
  </Card>

  <Card title="Conditions" href="/fundamentals/lindy-101/conditions" icon="network-wired">
    Add smart routing logic to email workflows
  </Card>

  <Card title="Templates" href="/fundamentals/lindy-101/templates" icon="clipboard-list">
    Jump-start with pre-built email workflows
  </Card>

  <Card title="Human in the Loop" href="/testing/human-in-the-loop" icon="square-user">
    Add approval steps for important emails
  </Card>
</CardGroup>
