# Connect an email inbox

Connect a mailbox and the requests people email you arrive in the workspace without anyone retyping them. The **Email (IMAP)** connector reads one folder. Each new message becomes a task, or goes to **Tasks → Inbox** for you to decide.

It works with any provider that offers IMAP: Gmail, Google Workspace, Outlook, Fastmail, or your own mail server. It only reads. It never sends mail from your mailbox.

## Before you start

- **Add your skills.** Go to **Console → Skills**. The engine picks a skill only from your own list, and the description is what it reads. Five or six skills, each with a one-sentence description, is enough.
- **Pick the folder.** Use a whole shared inbox, or one folder or label in your own mailbox. Connecting your whole personal inbox turns every newsletter into a question in the tray.

## Gmail and Google Workspace

Sign-in with Google (OAuth) is on the way. Until then, Gmail connects with an **app password**: a separate 16-character password that works only for this connection.

1. Turn on **2-Step Verification** for the Google account.
2. Open [myaccount.google.com/apppasswords](https://myaccount.google.com/apppasswords), create a password named `Fivexer` and copy it.

| Field | Gmail value |
| --- | --- |
| IMAP server | `imap.gmail.com` |
| Username | the full address, e.g. `support@yourcompany.com` |
| Password | the app password, not your normal Google password |
| Security | TLS (leave the port blank; it uses 993) |

On a Google Workspace account, your admin can turn app passwords off. If the app passwords page says they are not available, ask your admin, or use [a forwarder instead](#if-app-passwords-are-blocked).

### Only one folder of your own inbox

Gmail shows each label as a folder, so you can connect just the mail you label for Fivexer.

1. In Gmail, create a filter that adds a label, for example `Fivexer`, to the mail you want as work. Filter by sender, by the address it was sent to, or by a word in the subject.
2. In the connector, set **Folder** to `Fivexer`. A nested label is written `Parent/Child`.
3. Set **After a message is filed** to **Leave it alone**, so your own mail is not marked as read.

If the folder is not found, open Gmail's **Settings → Labels** and tick **Show in IMAP** for that label.

### A Google shared inbox

What to connect depends on what your shared inbox is:

| Your shared inbox is… | Connect |
| --- | --- |
| A real account the team shares, like `support@` | That account, folder `INBOX`, and **Mark it as read** so the team sees what is taken |
| A Google Group or collaborative inbox | A mailbox that is a member of the Group, e.g. a new `intake@` user. A Group has no mailbox of its own for IMAP to read |
| A mailbox delegated to you | That mailbox's own account. Your delegate access does not work over IMAP |

## Other providers

| Provider | IMAP server | Password |
| --- | --- | --- |
| Outlook.com | `outlook.office365.com` | An app password if two-step verification is on |
| Microsoft 365 | `outlook.office365.com` | Many organisations turn IMAP password sign-in off. If yours does, [use a forwarder](#if-app-passwords-are-blocked) |
| Fastmail | `imap.fastmail.com` | An app password from **Settings → Privacy & Security** |
| iCloud Mail | `imap.mail.me.com` | An app-specific password from your Apple Account |
| Your own server | What your mail app shows | Your mailbox password |

## Connect it in the console

1. Go to **Settings → Connectors** and press **Add a connector**.
2. Choose **Email** and press **Continue**.
3. Fill in the server, username and password.
4. Under **Fivexer API key**, press **Create a key**. The connector files mail through the intake API, so it needs its own key. Revoking that key later stops this connection and nothing else.
5. Open **More Email (IMAP) settings** if you need them:  **Folder**: blank reads `INBOX`. **After a message is filed**: **Mark it as read** (the default), **Leave it alone**, or **Move it to another folder**. **Read this many days of history first**: leave it blank the first time. A large number puts all of that old mail in the tray at once.
  - **Folder**: blank reads `INBOX`.
  - **After a message is filed**: **Mark it as read** (the default), **Leave it alone**, or **Move it to another folder**.
  - **Read this many days of history first**: leave it blank the first time. A large number puts all of that old mail in the tray at once.

6. Press **Check and continue**. The console checks both that the mailbox opens and that the key is accepted.
7. Keep **Mail into the inbox tray** switched on and press **Finish setup**.

On the connection card, **Sync now** reads the folder.

## What happens to each message

|  |  |
| --- | --- |
| **Task created** | It was work, and the engine was sure enough to create the task itself |
| **In the tray** | It needs you. Open **Tasks → Inbox**, check the skill and urgency, then **Make a task** or dismiss it |
| **Filed as not work** | A newsletter or receipt the engine was sure about |
| **Duplicate** | The same message was read twice. Nothing happens twice |

At first, everything goes to the tray. The engine creates tasks on its own only after it has learned from your answers there, so each accept and each dismiss teaches it.

## If app passwords are blocked

Forward the mail instead. Anything that can make an HTTPS request, such as a Cloudflare Email Worker, Zapier, Make or your own code, can post each message to `POST /v1/intake/messages` with an API key. See [Auth & keys](/docs/concepts/auth-and-keys/) for creating the key, and send the provider's `Message-ID` as `externalId` so a retry is never filed twice.

## Troubleshooting

| Problem | Do this |
| --- | --- |
| The login is refused | Use an app password, not your normal password. For Gmail, check that 2-Step Verification is on |
| The folder is not found | Check the spelling and use `/` for nested labels. In Gmail, tick **Show in IMAP** for the label |
| The Fivexer API key was rejected | Press **Create a key** again. A key revoked under **API keys** stops the connection |
| Intake is not enabled on this workspace | Your workspace does not have intake switched on yet. Contact support |
