> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/relate/automation-flows/common-questions/automation-flow-how-to-avoid-duplicates.md).

# Automation Flow - How to avoid duplicates

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

* You can also avoid duplicate opportunities directly in the CRM, [check the step-by-step guide 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="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FitDe6BMY80g59WRjlHQe%2Fflux1.png?alt=media&amp;token=92b79fdd-d838-40a0-b8ef-4ee75c13e78a" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FnheL0X0qVOKstbWrsw1d%2Fflux2.png?alt=media&amp;token=251fb960-e815-4c17-b9f7-e103efdc2150" alt=""><figcaption></figcaption></figure>

3 - Click “Open Builder”.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FIAIW6DBWJnANYOilInqg%2Fop22.png?alt=media&amp;token=9be5d740-d1b3-4e0e-aba6-c225f72cedd0" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F8nOwMGB3VyN1UgfKwXxl%2Fop2.png?alt=media&amp;token=66f84dc4-8dc7-42e1-81aa-64abc15d0f3a" alt=""><figcaption></figcaption></figure>

\
In **negative path**, 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>
