# Automation Flow - Deleting Leads via Segment

## In SprintHub, we have the option to delete Leads in bulk if they have one or more tags.&#x20;

{% hint style="danger" %}
Attention: when deleting the Lead(s), this action cannot be undone.
{% endhint %}

{% hint style="warning" %}
Leads that have opportunities in pipelines cannot be deleted. It is necessary to delete the opportunities before deleting the Lead.

To delete the opportunities, see this article: [CRM - Deleting Opportunities](https://docs.sprinthub.com/en/topics/general/crm/crm-common-questions/crm-deleting-opportunities)
{% endhint %}

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FvpednhwRBcBnaEKWBSrd%2Fundraw_Throw_away_re_x60k.png?alt=media&#x26;token=47d497d0-270c-4c13-adc5-09ad55e6e60f" alt=""><figcaption></figcaption></figure>

## To create the flow follow these steps:

1. Go to the “Automation Flows” service;

Or just type in “Find service” and it will already appear.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXc4GAHmdo3yxPNRBQUCNKP7rEoU_n4NacAA4_qVhDOwsOYdPBTdXS30xA9HBIKrc5RNWBKlRjRWWy1OPzJiT7cdBZm2UckqfvG0Ex8nGxqzJLPW1CDZPCqzPmT4cJVd2FmzRiesABsr_5bIMHI65KKWjQAb?key=e0ZeGKkErcUwKkUi3w1oKg" alt=""><figcaption></figcaption></figure>

2. Once in Automation Flows, click the “New” button;<br>

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfczxOXrIqfNIm3VSpux_ues72xFGPu2Xe1SNqaicIjkDfqQK3uCY5UQcYQ7_drBAZW_RKmocLWNKDwW169__us7moGw_U15GPen4ocr9v1BFD9YbLh2ieiHxSU282G5aY7fP7G0kaBHFvgaFUBT_Ni-XA?key=e0ZeGKkErcUwKkUi3w1oKg" alt=""><figcaption></figcaption></figure>

3. Enter the information and data for your flow;

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXcEKMxHuLHJb8etbqB2QIMiI89D6PR0k14pEcNNwUtVkLzVZxVbwEIvtVSt-8A5LZ8BEjyXEBld2wxJuTmezbb9f_et5AGAL11KLJV-GaPDNkol1pm4u-dVdKabR19fl9IERby6LaSPoHGpNNran2m2wT82?key=e0ZeGKkErcUwKkUi3w1oKg" alt=""><figcaption></figcaption></figure>

Adding a category is optional.

4. Click “Open Builder”;

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXcm-2RzNoMvnIYGWfsD0v93xYNcYnlxlJ9OXBzS1L_ilyMxI4Ec6hiAI0FlmK_R5l3VAugEcWTCZmRbzq1tOIBrUpx2uOGo0UlhDyQ-2uIF4yBwj9XAoO94mWa-QQKK6Zci3KopLltECIS9zgBSY4w24jA?key=e0ZeGKkErcUwKkUi3w1oKg" alt=""><figcaption></figcaption></figure>

{% embed url="<https://youtu.be/sn44zj6kT3g>" %}

5. Once done, to activate your flow under “Published?”, set it to yes and then click “Save” and then “Save and close”;<br>

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXdPlNC9iOiX0BEA1HQ2M90k21Gv9Q_4j9xRRFTbBD1l4Vd2UpvROYyCJ61lLK4AqZ5MZgaAt2r3C8MmGLkXds-fRMJJtSb24OGpMSLS-wYxk-62IjK-5-jmHhrQO4Wny7pTZ4grTSltmzmA5JuBeBTm_jdX?key=e0ZeGKkErcUwKkUi3w1oKg" alt=""><figcaption></figcaption></figure>

*Done! Your deletion flow will start, and if the leads match the condition, they will be deleted.*&#x20;

{% hint style="danger" %}
*<mark style="color:red;">**Warning! Deleting the Lead(s) is an irreversible action.**</mark>*
{% endhint %}
