> 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-access-permission-imported-leads.md). Agents can also search and read this documentation through its [MCP server](https://docs.sprinthub.com/~gitbook/mcp).

# Automation Flow - Access Permission (Imported Leads)

In this example, the leads are imported via spreadsheet and need to receive a lead access permission automation so that each saleswoman has her opportunities and service cases with restricted visibility.\
\
To do this, follow the step-by-step instructions below:

1 - Create a segment where the spreadsheet leads will be sent. Example: Spreadsheet Leads.

To learn how to create a segment, click [here](https://docs.sprinthub.com/topicos/relacionar/segmentos).\
\
2 - Create tags for each saleswoman. To learn how to create tags, click [here](https://docs.sprinthub.com/topicos/configuracoes/tags).

3 - Now let's create an automation flow so that when the leads are added to the Spreadsheet Leads segment, they receive permissions according to each saleswoman's tags.

Go to Automation Flow

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FSeOiZy750yZ8Qr7VHK3p%2Fflu1.png?alt=media&amp;token=eb14b845-65f5-460d-b66e-93287f62c5fb" alt=""><figcaption></figcaption></figure>

4 - Click New and add a name, set the Spreadsheet Leads segment.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FgP8C3j3lFOp7fiuezJax%2Fflu2.png?alt=media&amp;token=e92a3c0a-a975-4919-99b3-7fa5d8a73459" alt=""><figcaption></figcaption></figure>

5 - Open the builder, click Start, and add the following blocks:

**CONDITION**: Does the lead have a tag? - Specify the tag that will be associated with saleswoman 1.\
\
In the positive output of this block, choose the **ACTION**: Change simple lead access permissions, indicate the user who will have permission on this lead, select them as the owner, and finally choose the department.

In the negative output of this block, repeat the process for saleswoman 2, as shown in the image below:

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FOZWqij5b8BJ5ZMjAOFkg%2Fflu4.png?alt=media&amp;token=0f19eb78-a602-4706-9fa7-a07c8fcb2357" alt=""><figcaption></figcaption></figure>

Save the automation, click Published to activate it.

{% hint style="warning" %}
When uploading the spreadsheet, add the first saleswoman's tag and indicate the segment. Do the same for the other saleswomen. **There is no need to change the lead permission when uploading the spreadsheet,** because the automation flow will do that through the segment and the tag.
{% endhint %}
