---
title: "Mail: Inbox, Search & Automations"
description: "Read, search, and triage your Gmail inbox in Mail — keyboard shortcuts, bulk cleanup, auto-triage rules, native Gmail filters, and CRM context on a thread."
---

# Inbox, Search & Automations

This page covers day-to-day inbox work in [Mail](/docs/template-mail): reading and triaging messages, searching across every connected account, cleaning up in bulk, and the two ways to automate recurring triage. It's written for anyone using Mail, not just developers.

## Reading and triaging

Move through your inbox without touching the mouse:

| Key       | Action                      |
| --------- | --------------------------- |
| `J`       | Next email                  |
| `K`       | Previous email              |
| `Up/Down` | Same as J/K                 |
| `Enter`   | Open focused email          |
| `E`       | Archive email or thread     |
| `D`       | Trash email or thread       |
| `S`       | Star or unstar              |
| `R`       | Reply                       |
| `U`       | Toggle read/unread          |
| `C`       | Compose new email           |
| `/`       | Focus search bar            |
| `Cmd+K`   | Open command palette        |
| `G I`     | Go to Inbox                 |
| `G S`     | Go to Starred               |
| `G T`     | Go to Sent                  |
| `G D`     | Go to Drafts                |
| `G A`     | Go to Archive               |
| `Esc`     | Close thread / clear search |

Everything a shortcut does, you can also ask for: "archive all Netlify bot emails older than a week," "star anything from Priya," "mark everything in this thread as read."

## Searching across every connected inbox

Type in the search bar, or ask the agent — one query searches across every connected Gmail account at once, not just whichever tab happens to be open. If you've connected personal and work accounts, "find the invoice from Acme" checks both.

## Bulk actions for inbox cleanup

Archiving, starring, and marking read all work in bulk against your real connected Gmail accounts — select several messages (or ask the agent to act on "all of these") and Mail batches the requests per account instead of one call per message. A separate date-based cleanup ("archive anything older than 30 days") and a JSON export of a view are also available, but both currently operate on the local demo mailbox rather than a connected Gmail account.

For clearing out a large backlog of unread mail in one account, use "mark everything unread as read" rather than asking the agent to open and mark each conversation one at a time — Mail runs that as a single verified bulk operation and reports how many messages actually changed.

## Auto-triage rules vs. native Gmail filters

Mail has two distinct ways to automate what happens to incoming mail — pick deliberately:

<Callout tone="info">

**Automation rules** match new mail against a plain-English condition you write ("from a newsletter," "subject contains invoice") using AI, and apply an action (label, archive, mark read, star, trash). They run automatically about once a minute inside Mail.

**Gmail filters** are Gmail's own native mechanism — they run inside Gmail itself, before automation rules ever see the message, and use Gmail's exact search syntax (`from:`, `older_than:`, has-attachment, size, and so on). They keep working even when Mail isn't open.

Use a Gmail filter when the rule is expressible in Gmail's own criteria; use an automation rule when the condition needs judgment ("if this looks like a sales pitch").

</Callout>

<Diagram id="doc-block-mail4" title="Automation rule lifecycle" summary={"A rule you describe in plain English runs against new inbound mail on a recurring schedule and applies its action automatically."}>

```html
<div class="diagram-flow">
  <div class="diagram-node">
    You describe a rule<br /><small class="diagram-muted"
      >"from a newsletter" → archive</small
    >
  </div>
  <div class="diagram-arrow diagram-muted" aria-hidden="true">&rarr;</div>
  <div class="diagram-panel center">
    <span class="diagram-pill accent">New inbound mail</span
    ><small class="diagram-muted">checked every minute</small>
  </div>
  <div class="diagram-arrow diagram-muted" aria-hidden="true">&rarr;</div>
  <div class="diagram-box">
    AI matches condition<br /><small class="diagram-muted"
      >per rule, per message</small
    >
  </div>
  <div class="diagram-arrow diagram-muted" aria-hidden="true">&rarr;</div>
  <div class="diagram-box">
    Action applied<br /><small class="diagram-muted"
      >label · archive · mark read · star · trash</small
    >
  </div>
</div>
```

```css
.diagram-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.diagram-flow .center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
```

</Diagram>

## CRM context on a thread

Open a thread and Mail's contact sidebar can show CRM context for whoever sent it. HubSpot is the one connected end to end today — ask the agent "who is this and what deals do they have open," and it looks up the contact, up to 5 associated deals, and up to 5 associated tickets from your configured HubSpot account.

Gong, Pylon, and Apollo appear in the same sidebar panel, but only when you've added their API keys in Settings, and only as a read-only sidebar view — the agent cannot pull a Gong call or a Pylon ticket into chat today, only HubSpot.

## What's next

- [**Drafting, Scheduling & the Draft Queue**](/docs/template-mail-drafts-and-queue) — replying to what you just triaged
- [**Talking to the Agent**](/docs/template-mail-agent) — prompts by task, and when to escalate beyond the canned actions
- [**Developer Guide**](/docs/template-mail-developers) — the full action inventory behind this page
- [**Mail overview**](/docs/template-mail) — back to the app summary
