# Automation Flow - Access Permission (Imported Leads)

In this example the leads are imported via spreadsheet and need to receive an automation that grants access permission to the lead so that each salesperson has their opportunities and interactions with restricted visibility.\
\
To do this, follow the step-by-step 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 salesperson. 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 leads are added to the Spreadsheet Leads segment, they receive permissions according to each salesperson's tags.

Go to Automation Flow

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

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

<figure><img src="/files/08232b9935c780d2e15af81a4ef50b3fff8c9027" alt=""><figcaption></figcaption></figure>

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

**CONDITION**: Does the lead have a Tag? - Indicate the Tag that will be related to salesperson 1.\
\
On 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 responsible party, and finally choose the department.

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

<figure><img src="/files/0f624ea539c76b51d1729ed64beb067a71b3deee" alt=""><figcaption></figcaption></figure>

Save the automation, click Published to activate.

{% hint style="warning" %}
When uploading the spreadsheet, add the first salesperson's tag and indicate the segment. Do the same for the other salespeople. **It is not necessary to change the permission on the lead at the moment of uploading the spreadsheet,** because the automation flow will do that via the segment and the tag.
{% endhint %}


---

# 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-access-permission-imported-leads.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.
