# Automation Flow - How to avoid duplicates

In the Automation Flow it is possible to create an automation that prevents the duplicate creation of opportunities.

* You can also prevent duplicate opportunities directly through the CRM, [check the step-by-step here.](https://docs.sprinthub.com/topicos/geral/crm/crm-automacoes/crm-automacao-para-evitar-oportunidades-duplicadas)

In the following example we used segments, but you can also use tags, if applicable.

* [To learn how to create segments click here.](https://docs.sprinthub.com/topicos/relacionar/segmentos)
* [To learn how to create tags click here.](https://docs.sprinthub.com/topicos/configuracoes/tags)

1 - Go to Automation Flow, click +New and add a Name.

<figure><img src="/files/605d91dbc122f43da7c6c4443fa9088a0f32d73c" alt=""><figcaption></figcaption></figure>

2 - Select “Allow leads to restart the flow” YES, and “Published” at the end of the configuration.\
Indicate the main segment.&#x20;

<figure><img src="/files/3e89f7901f901dfb531f4254273777e4919d2968" alt=""><figcaption></figcaption></figure>

3 - Click “Open Builder”.

<figure><img src="/files/b6df101391b74526601bdfc0644cf6179f81976d" alt=""><figcaption></figcaption></figure>

Add the **Condition**: “Does the lead have an opportunity?” >> The Lead does NOT have an opportunity.\
On the **positive output** of this first block, we will add **one more Action**: “Create opportunity >> Configure the opportunity as shown below:

<figure><img src="/files/92784069963569e34689796c3342700505181bfb" alt=""><figcaption></figcaption></figure>

\
In **negative output**, then add the action “Notify an employee” >> Select an employee to be notified, in the case of leads that ALREADY HAVE opportunities.\
Save the automation.<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sprinthub.com/en/topics/relate/automation-flows/common-questions/automation-flow-how-to-avoid-duplicates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
