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

# Leads from email

> Let the agent read portal emails in Gmail or Outlook, turn each one into a lead and write to the person on WhatsApp.

Many property portals send each inquiry by email. Connect the inbox where those emails land, and the agent creates a lead from each one and writes to the person on WhatsApp. It works with Google Mail and Microsoft Outlook.

## How it works

* The agent checks the inbox every minute. It looks at emails that arrived in the last 48 hours, read or unread, and never at emails from before you connected the inbox.
* It only takes the emails that match your rules: the label or folder, words in the subject and the sender. It skips the emails you sent and your drafts.
* The AI reads each email and pulls out the person's name, phone and the other details.
* The lead is created even without a phone, but the agent can't write to it until someone adds one. An email that yields no name, email address or phone doesn't create a lead.
* If the person is already a lead of the agent, the lead is updated and gets a new first message.
* The agent never changes your inbox: it doesn't mark emails as read, move them or delete them. Access to Gmail is read-only.
* Each agent reads one inbox: either Google Mail or Microsoft Outlook, not both.

## Set it up

**1. Open Lead reception**

Open the agent and, in **Setup**, select **Lead reception**.

**2. Connect the inbox**

On the **Google Mail & Microsoft Outlook** card, select **Connect**. Under **Choose a provider**, pick one and select **Authorize Google Mail** or **Authorize Microsoft Outlook**. Sign in and allow access in the window that opens.

**3. Choose which emails it reads**

Under **Which emails it looks at**, set a **Gmail label** or **Outlook folder**, **The subject contains** (several words separated by commas; one of them is enough) and **The sender contains** (a domain such as `@portal.com`, or an address). Select **Save filters**.

**4. Set the sending hours (optional)**

Switch on the **Sending Schedule** to choose the days and hours when the agent may send first messages, and select **Save schedule**. See [Business hours](https://docs.newlead.ai/guide/agents/business-hours.md).

**5. Start capturing**

Select **Start capturing** and confirm. The account shows **Running**.

## Good to know

* With no rules at all, the agent analyses everything that lands in the inbox, advertising included, and may reply to emails that aren't leads. Add at least a sender rule.
* **Stop capturing** pauses the reading. The account shows **Paused** and no new emails are turned into leads.
* If Gmail or Outlook stops authorizing access, capturing stops and the alert "The agent's email got disconnected" opens. Connect the same inbox again: your rules are kept and the emails from the last 48 hours are picked up. After reconnecting, select **Start capturing** again. Connecting a different inbox starts from zero.
* While a subaccount is pending or paused, its emails are kept and processed when it's active again.
* **Disconnect email** stops the agent from reading the inbox and writing to new email leads. You can connect it again at any time.

## Related

* [Lead reception](https://docs.newlead.ai/guide/channels/lead-reception.md)
* [WhatsApp templates](https://docs.newlead.ai/guide/channels/whatsapp-templates.md)
* [Meta Lead Ads](https://docs.newlead.ai/guide/channels/meta-lead-ads.md)


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