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

# Connect email

> The emails of your support inbox: Gmail or Google Workspace through a Google app of your company's, or any other provider over IMAP.

You connect the inbox your customers write to (for example, `support@yourcompany.com`). Desk reads it every minute, each new email comes in as a conversation and the reply goes out from that same address, in the same thread.

There are two ways to connect it:

* **Gmail or Google Workspace**: through a **Google app of your company's** (a free Google Cloud project, in your name). You do it once and it takes about 10 minutes.
* **Another provider (IMAP)**: with the address and an **app password**. It works for most providers (Yahoo, iCloud, Zoho, your domain's hosting…), and for Gmail too if you'd rather not create the app.

> [!NOTE]
>
> Outlook, Hotmail and Microsoft 365 can't be connected yet: Microsoft doesn't let apps in with a password.

## Add the channel

**1. Pick Email**

In **Channels**, tap **Add channel** and pick **Email**.

**2. Choose who answers**

Fill in the **Channel name**, the **Answering agent** and the **Receiving team**, and tap **Continue**. You land on the channel's **Connection** tab.

**3. Choose where the inbox is**

Under **Where is the inbox?**, pick **Gmail or Google Workspace** or **Another provider (IMAP)**, and follow the matching section below.

## Gmail or Google Workspace

> [!TIP]
>
> Do it on a computer: Google Cloud's console is awkward on a phone. Sign in to Google Cloud with the account of the inbox you'll connect, or with a company account that manages it.

**1. Create a project**

At [console.cloud.google.com/projectcreate](https://console.cloud.google.com/projectcreate), create a project (for example, **desk**) and open it.

**2. Enable the Gmail API**

On [the Gmail API's page](https://console.cloud.google.com/apis/library/gmail.googleapis.com), with your project picked at the top, tap **Enable**.

**3. Set up the consent screen**

In [Google Auth Platform](https://console.cloud.google.com/auth/overview), tap **Get started**:

1. **App name**: your company's. **User support email**: yours.
2. **Audience**: **Internal** if the inbox is Google Workspace (your domain's); **External** if it's a Gmail account.
3. **Contact information**: your email. Agree to the policy and tap **Create**.

**4. Fill in the app's details**

In [Branding](https://console.cloud.google.com/auth/branding):

* **Application home page** and **privacy policy link**: your site's links.
* **Authorized domains**: your site's domain and **min-ai.ar** (desk comes back from Google to an address on that domain).

Don't upload a logo: Google would ask to verify the app. Tap **Save**.

**5. Publish the app (Gmail accounts only)**

In [Audience](https://console.cloud.google.com/auth/audience), tap **Publish app** and **Confirm**. Google warns it would need verifying: it doesn't, the app is your company's and only your inbox uses it. Publishing it keeps the connection from being cut off after 7 days. If you chose **Internal** (Workspace), skip this step.

**6. Create the client**

In [Clients → Create client](https://console.cloud.google.com/auth/clients/create):

1. **Application type**: **Web application**. Give it a name (for example, **desk**).
2. Under **Authorized redirect URIs**, tap **Add URI** and paste the one desk's console shows as **Authorized redirect URI** (`https://desk.min-ai.ar/hooks/email/google`).
3. Tap **Create** and, before closing, **Download JSON**: Google doesn't show the secret again afterwards.

**7. Upload the JSON and authorize**

In desk's console, tap **Upload the JSON**, pick the file you downloaded and tap **Authorize with Google**. Pick the inbox's account.

Google shows "Google hasn't verified this app": that's expected, the app is yours (your email shows as the developer). Tap **Advanced → Go to min-ai.ar**. If Gmail's permission has a checkbox, **tick it** and tap **Continue**.

You're back on the channel's page: "Done, it's connected!". From then on desk reads the new emails.

> **If something goes wrong**
>
> * **"That client is missing the redirect URI"**: edit the client in Google Cloud, add the console's URI, save and download the JSON again.
> * **"That client is of type Desktop app"**: create another client, of type **Web application**.
> * **"The Gmail API is off"**: tap **Enable the Gmail API in your project**, then **Enable**, and authorize again.
> * **"Gmail's access was left unticked"**: authorize again and tick the permission's checkbox on Google's screen.
> * **The channel disconnects after a week**: the app was left in testing. Publish it (step 5) and authorize again.

## Another provider (IMAP)

**1. Get an app password**

Most providers don't let other apps in with the account's password: they ask for an **app password**.

* **Gmail**: turn on [2-Step Verification](https://myaccount.google.com/security) and create one at [myaccount.google.com/apppasswords](https://myaccount.google.com/apppasswords) (name: **desk**). It's 16 letters.
* **Yahoo** and **iCloud**: in the account's security, "Generate app password".
* **Your domain's hosting**: the mailbox's password usually works.

**2. Connect**

In the console, fill in the **Email address** and the **App password**, and tap **Connect**. Desk finds your provider's servers by itself, signs in to check they work (reading over IMAP and sending over SMTP) and it's connected.

If it can't find them, it asks for the **Servers**: one for both (`mail.yourcompany.com`) or IMAP and SMTP separated by a comma (`imap.yourcompany.com, smtp.yourcompany.com:587`). Your provider's help or your mail app's settings have them.

Desk only reads the **Inbox**, without marking anything as read, and keeps a copy of each reply in **Sent** (Gmail keeps it by itself).

## Sender and signature

On the channel's **Sender** tab:

* **Sender name**: who the customer sees writing to them (for example, "Zapas · Support"). Empty: just the address.
* **Signature**: it goes under every email desk sends, whether the agent or a person of the team writes it. The agent doesn't sign: the channel adds it.

## How email is answered

Email isn't a chat: customers read when they can and don't expect an answer in seconds. So on this channel:

* **One complete reply per email.** The agent answers everything they asked in one email, with a greeting, paragraphs and a brief closing. If it needs something from the customer, it asks for all of it at once.
* **It waits a minute before answering**, in case a second email comes ("I forgot the attachment…"): it reads them together.
* **Each email in its thread.** The reply goes out with **Re:** and the subject, and reaches the customer in the same conversation of their mail app. If they reply, it goes on in the same conversation in desk.
* **Only what's new.** Of each email, desk keeps what the customer wrote, without the quoted part of earlier emails. In the inbox you see the subject above each email and its attachments' names (the files stay in your inbox).
* **No automatic replies.** Bounces, out-of-office notices, newsletters and `no-reply` emails don't open a conversation.

Your instructions for the agent (in **Agents**) work as on the other channels: the tone, what it solves and when it hands off. There's no need to tell it it's email.

## Change the settings

On the inbox's card, **Configure**. The channel's page has three tabs:

* **Who answers**: the channel's name, agent and team. At the bottom, **Remove**.
* **Connection**: connected, it shows the inbox, how desk gets in (the Google app and its project, or the IMAP and SMTP servers) and **Disconnect**, which deletes the credentials (on Gmail, it also revokes desk's access) and stops reading the inbox; the channel and its conversations stay. If the channel shows **Disconnected** (the access was revoked, the password changed or you disconnected it), both ways to connect it show here again: upload the JSON and authorize again, or enter the new password. To change how desk gets in (from the Google app to IMAP, or the other way round), disconnect it and connect it the other way. It must be the same inbox: to connect another one, add another channel.
* **Sender**: the name and the signature (above).

**Remove** stops desk reading the inbox and deletes its conversations. The emails stay in your inbox; contacts and cases stay.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.