# Auto-label potential leads with AI

**Auto-label potential leads with AI** is a Missive rule template designed for those who are looking to track new incoming leads and potentially use Missive as a lightweight CRM.

#### When enabled:

* The rule allows you to automatically add a label to any incoming emails from new leads.

#### Here’s how it works:

* You need to include your inbound sales email address.
* You need to add your existing leads and customers to your contact book.
* You need an [**AI integration**](https://missiveapp.com/docs/ai/setup) (OpenAI, Anthropic, or Gemini).
* You need to select **Prompt Result = yes**.
* You need a [prompt](https://missiveapp.com/docs/ai/using-ai/prompts) that captures the emails that indicate possible new business.
* You need to create a **potential leads** label.

***

### Incoming email rule: Auto-label potential leads with AI

This rule is meant to help you identify and label potential new business, without any additional manual steps or another piece of software.

<a href="https://mail.missiveapp.com/?importRule=auto-label-emails-from-new-potential-sellers_incoming-message" class="button primary" data-icon="plus">Add to Missive</a>

#### There are four conditions and one action to make this rule work:

{% stepper %}
{% step %}
**These 4 conditions must match:**

Each time an email is sent to your sales@ team, the sender’s email address **is not in your contact book**, the **number of messages in the thread is less than 2**, and it matches your prompt
{% endstep %}

{% step %}
**The AI prompt template:**

You can test and edit as needed, originally designed for a real estate firm:

> Analyze the email content and determine whether the sender is a potential real estate seller (e.g., expressing intent to sell a property, asking about listing, valuation, or selling options). If yes, respond only with 'Yes'

{% hint style="info" %}
As always with AI-powered rules, [test a few emails](https://missiveapp.com/docs/advanced-features/rules/ai-rules#debugging-ai-rules) to ensure you’re happy with the accuracy of the results. If not, keep tweaking and making the prompt more specific.
{% endhint %}
{% endstep %}

{% step %}
**Action: Add label(s)**

When all conditions match, this rule will automatically add a potential leads label.
{% endstep %}
{% endstepper %}

<div data-with-frame="true"><figure><img src="https://3242897856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2FkEes22iDlTHQuBkrcq62%2Fautolabels-AI.png?alt=media&#x26;token=ef5b6263-db56-4d6f-9f4c-7cffa8e43a7d" alt=""><figcaption></figcaption></figure></div>

<table><thead><tr><th width="220.484375">Component</th><th>Value</th></tr></thead><tbody><tr><td>Condition 1</td><td><strong>To is</strong> → {...}</td></tr><tr><td>Condition 2</td><td><strong>From</strong> → Not in contacts</td></tr><tr><td>Condition 3</td><td><strong>Number of messages in conversation</strong> → is lower than 2</td></tr><tr><td>Condition 4</td><td><strong>Prompt result is</strong> → Yes</td></tr><tr><td>Action 1</td><td><strong>Assign user(s)</strong> → {...}</td></tr></tbody></table>
