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

# Gmail

> Connect Gmail so your agent can read and send emails

Connect Gmail to give your agent the ability to read your inbox, draft emails, send messages, and follow up with contacts — all through your real email address.

## Connecting Gmail

<Steps>
  <Step title="Go to Integrations">
    Navigate to **Settings → Integrations** and click **Gmail**.
  </Step>

  <Step title="Sign in with Google">
    Click **Connect** and sign in with the Gmail account you want your agent to use. This opens Google's OAuth flow.
  </Step>

  <Step title="Grant Permissions">
    Spark requests permission to:

    * **Read your email** — so your agent can check your inbox and find relevant messages
    * **Send email on your behalf** — so your agent can compose and send messages from your address

    Click **Allow** to proceed.
  </Step>

  <Step title="Confirm Connection">
    Once connected, you'll see the Gmail integration marked as active. Your agent can now work with your email.
  </Step>
</Steps>

<Info>
  Emails sent by your agent come from your Gmail address. Recipients see your name and email — they won't know an AI composed the message unless you choose to disclose it.
</Info>

## What Your Agent Can Do

### Read Emails

> "Check my inbox — anything urgent?"

> "Do I have any emails from Acme Corp this week?"

> "Summarize the last email from Jordan"

Your agent can search your inbox, read specific messages, and give you summaries.

### Draft Emails

> "Draft a follow-up email to Sarah about the proposal we sent last week"

> "Write an introduction email to the Acme team — reference our Premium tier pricing"

When you ask your agent to draft an email, it composes the message and shows it to you in chat for review before sending.

### Send Emails

> "Send Sarah the follow-up we just drafted"

> "Email all contacts tagged 'Trade Show' with our event follow-up template"

Your agent sends the email through Gmail's API — it appears in your Sent folder like any other email you'd send.

### Reply to Emails

> "Reply to Jordan's last email — tell them we can do the demo on Thursday at 2pm"

> "Respond to that pricing inquiry — use our standard rates from the pricing guide"

Your agent reads the original message, composes a contextual reply, and sends it as a proper email thread reply.

## Email + CRM Integration

Gmail is most powerful when combined with your CRM:

* **Incoming emails** from known contacts are automatically associated with their CRM profile
* **Sent emails** are logged as activity on the contact
* **Your agent** can reference a contact's email history when composing new messages

**Examples:**

> "What was the last thing we emailed to the Peak Fitness team?"

> "Send Jordan a follow-up based on our last conversation — check the contact notes for context"

## Automated Email Workflows

### Lead Follow-up

Set up an automation to draft response emails when new leads arrive:

**Trigger:** New contact created\
**Action:** "Draft a personalized welcome email based on the contact's source and any details in their notes. Use our standard intro template as a starting point. Save as a draft for review."

### Scheduled Email Reports

Use a schedule to send recurring email updates:

> "Every Friday at 4pm, compile a weekly summary of new leads, deals closed, and pipeline changes. Email it to [team@company.com](mailto:team@company.com)."

### Inbox Monitoring

Set up a schedule to check for important emails:

> "Every hour between 9am and 5pm, check my inbox for emails from contacts in the Hot lead category. If any are found, summarize them and post to chat."

## Email Best Practices

<Tabs>
  <Tab title="Review Before Sending">
    For important emails (proposals, pricing, new client outreach), ask your agent to draft first and review before sending. You can edit in chat:

    > "Good draft, but change the subject line to mention the Q2 discount and remove the last paragraph"
  </Tab>

  <Tab title="Use Knowledge Files">
    Give your agent email templates in its knowledge files. Include templates for common scenarios: initial outreach, follow-ups, proposals, meeting confirmations, and thank-yous. The agent adapts the template to each situation rather than starting from scratch.
  </Tab>

  <Tab title="Set Boundaries">
    In your agent's instructions, define what it can send automatically vs. what requires your review:

    ```
    Email rules:
    - Auto-send: meeting confirmations, calendar links
    - Draft for review: pricing emails, proposals, first contact
    - Never send: contract terms, legal documents, refund approvals
    ```
  </Tab>
</Tabs>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Agent can't read my email">
    Verify the Gmail integration is connected in **Settings → Integrations**. If it shows as disconnected, click **Reconnect** and go through the OAuth flow again. Make sure you grant both read and send permissions.
  </Accordion>

  <Accordion title="Emails aren't showing in Sent folder">
    Emails sent via the Gmail API should appear in your Sent folder automatically. If they're not showing, try disconnecting and reconnecting the integration. Check that you authorized the correct Gmail account.
  </Accordion>

  <Accordion title="Want to limit what the agent can access">
    Currently, the Gmail integration gives your agent access to your full inbox. Use instructions to tell your agent which emails to focus on and which to ignore:

    > "Only read and respond to emails from contacts in our CRM. Ignore newsletters, promotions, and automated notifications."
  </Accordion>
</AccordionGroup>

<Warning>
  Your agent sends emails from your real email address. Always review important emails before approving them to send. Set clear rules in your agent's instructions about what requires human review.
</Warning>

## Privacy

Your agent reads emails on-demand — it doesn't continuously index your entire inbox. When you ask about email or an automation triggers, the agent queries Gmail's API for the relevant messages. Email content is processed in real-time and not permanently stored in Spark beyond what's logged as contact activity.
