> ## 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.

# Gmail

> Complete email automation for sending, receiving, organizing, and managing complex email workflows with intelligent responses

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

## Overview

Gmail integration provides comprehensive email automation for sending, receiving, organizing, and managing email workflows. Create sophisticated email sequences that can automatically respond to replies and manage ongoing conversations.

## Available Triggers

Connect your Gmail account to enable powerful email automation. Set up triggers to respond to incoming emails, sent messages, attachments, and label changes. Use filters to target specific emails and avoid information overload.

* **Email Received**: Triggers when new emails are received in Gmail. Most popular trigger - use filters to target specific emails!
* **Email Sent**: Triggers when emails are sent from your Gmail account.
* **New Attachment Received**: Trigger when new email attachments are received in Gmail.
* **New Email Matching Search**: Triggers when new emails match specified Gmail search criteria and labels.
* **New Labeled Email**: Triggers when new emails with specified Gmail labels are received.

## Available Actions

### Core Email Actions

* **Send Email**: Send an email using your Gmail account with full formatting support.
* **Send Reply**: Draft or send a reply to an email with conversation threading.
* **Draft Email**: Saves an email as a draft for later editing or sending.
* **Edit Draft**: Edits an existing draft email with new content.

### Email Management

* **Add Label to Email**: Adds a label to one or more emails for organization.
* **Remove Label from Email**: Removes a label from one or more emails by message IDs and label ID or name.
* **Delete Label**: Deletes a Gmail label entirely.
* **Archive**: Archives an email to remove it from the inbox.
* **Unarchive**: Unarchives an email by ID to restore it to the inbox.

### Email Status Management

* **Mark Email as Read**: Marks an email as read.
* **Mark Email as Unread**: Marks an email as unread by ID.
* **Mark Email as Important**: Marks an email as important by ID.
* **Mark Email as Unimportant**: Marks an email as unimportant by ID.
* **Move Email to Trash**: Moves an email to the trash.
* **Move Email Out of Trash**: Moves an email out of the trash by ID.

### Search & Retrieval

* **Find Email**: Search and retrieve messages from Gmail using filters and labels.
* **Search Emails**: Search for emails in your Gmail account matching specific filters.
* **Get Email**: Gets the specified email by ID with full content and metadata.
* **Find Email Address By Person**: Given a person's name, try to find their email address from your contacts.

## Smart Email Sequences & Reply Monitoring

<Frame>
  <img src="https://mintcdn.com/lindyai/vTETa6Bb9Fi7xfg7/lindy-brand-assets/gmail-stateful-actions.png?fit=max&auto=format&n=vTETa6Bb9Fi7xfg7&q=85&s=d619b24835b376f4c90b4cc76859d731" alt="Gmail stateful actions showing automated follow-up sequences after email sending" width="702" height="388" data-path="lindy-brand-assets/gmail-stateful-actions.png" />
</Frame>

Gmail actions can create intelligent email sequences that automatically monitor and respond to replies. After you send an email, Lindy can watch for responses and take follow-up actions, creating powerful automated conversations:

* **After email sent**: Automatically monitor for replies, set reminders, or trigger follow-up actions
* **After reply received**: Process responses, extract information, or escalate conversations

This enables reactive workflows where your agent can handle both sending emails and intelligently responding to replies.

## Conversation Management & Thread Assignment

<Frame>
  <img src="https://mintcdn.com/lindyai/vTETa6Bb9Fi7xfg7/lindy-brand-assets/gmail-linked-actions.png?fit=max&auto=format&n=vTETa6Bb9Fi7xfg7&q=85&s=1eb9a3932a38ba3c4c33233b9adde526" alt="Gmail linked actions showing Observe thread and Send Reply capabilities" width="1206" height="704" data-path="lindy-brand-assets/gmail-linked-actions.png" />
</Frame>

### Special Conversation Actions

* **Observe Thread**: Monitor your inbox for new emails in ongoing conversations. The system will alert you when new emails arrive, creating a monitoring point for email surveillance.
* **Send Reply (Linked)**: Draft or send a reply to an email within the context of a monitored conversation.

### Managing Multiple Email Conversations

<Frame>
  <img src="https://mintcdn.com/lindyai/vTETa6Bb9Fi7xfg7/lindy-brand-assets/gmail-multiple-stateful-assign-thread.png?fit=max&auto=format&n=vTETa6Bb9Fi7xfg7&q=85&s=6256acbc927ca46bf7df0db1910828b2" alt="Gmail thread assignment interface for managing multiple concurrent email workflows" width="786" height="536" data-path="lindy-brand-assets/gmail-multiple-stateful-assign-thread.png" />
</Frame>

When running multiple email workflows simultaneously, you need to assign the proper conversation thread to ensure actions target the correct email exchange. This prevents mixing up different email conversations and ensures each response goes to the right person.

**How it works:**

* Send multiple emails that monitor for replies
* Each email creates its own conversation thread
* When replies come in, select which specific conversation you're responding to
* Each conversation maintains its own context and history

## Email Filtering Best Practices

When using the "Email Received" trigger, always use filters to target specific emails. Without filters, you'll receive notifications for every email, which can overwhelm your automation.

* Use sender filters: `from:specific@email.com`
* Subject line filters: `subject:urgent OR subject:important`
* Label-based triggers for pre-organized emails
* Attachment filters for document processing workflows

HTML Email Signatures: In the signature field, you can include HTML email signatures for rich formatting, images, and professional branding.

## Best Practices

<AccordionGroup>
  <Accordion title="Workflow Design">
    Structure your email automations for success:

    * Start with simple send/receive automation before building complex sequences
    * Plan your email journey from send to final resolution
    * Monitor thread assignments in multi-workflow scenarios
  </Accordion>

  <Accordion title="Email Filtering & Testing">
    Ensure your triggers work reliably:

    * Test email filters thoroughly to avoid missing important messages
    * Use specific sender and subject filters to target the right emails
    * Start with low-volume filters before scaling up
  </Accordion>

  <Accordion title="Security & Review">
    Maintain control over sensitive communications:

    * Use draft actions for human review before sending sensitive emails
    * Verify recipient addresses in automated workflows
    * Set up approval processes for important email sequences
  </Accordion>
</AccordionGroup>

## Related Resources

<CardGroup cols={2}>
  <Card title="Email Assistant" href="/use-cases/popular-workflows/email-triage" icon="envelope">
    Step-by-step email automation guide
  </Card>

  <Card title="Google Calendar" href="/skills/popular-integrations/google-calendar" icon="calendar-range">
    Combine email and calendar automation
  </Card>

  <Card title="Triggers" href="/fundamentals/lindy-101/triggers" icon="bolt">
    Set up email-based triggers
  </Card>

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