# Automation Flow - Starting Chatbot in imported opportunities

Imagine that you want to import opportunities and send messages to these leads via chatbot. To do this, follow the steps below:

In this strategy you will need:

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

Now let's configure our Automation Flow:

1 - Access Automation Flows, and click +New

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdmmaW2QTrMscL8IlaOXzCAkeQnARH2atN4-2ZpS8mCQXhVwP_vBt9YpU9ZnBPaZSa87cyUcJDCHtZAnHMbEXqFL285Nl92iOWrLeSK_XpLssmHLM1mMRpgdQp6H9ILujheoR87HiqfBEo0AKvohqQ__vdY?key=kBfnYrXDoyqIkjwQKonTpA" alt=""><figcaption></figcaption></figure>

2 - Add a Name, indicate the segment so that the leads who enter this segment go through this flow. Click on “Open Builder”.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdX1lCJrz9DWKfgGBSjmUpCOgF3VNKlnbt9_snjUQiF7Frz_u6roRcQqpuL328VLKh-hffBe82Gp-ACgwWJkO_XuD7FlMcdPJ2w3GstMQAA__48GXJ2_Yj1EOK3UcevTqFHgKIHI7CIRLu9usfpD68_WBQ?key=kBfnYrXDoyqIkjwQKonTpA" alt=""><figcaption></figcaption></figure>

3 - Configure the automation as follows:\
\
**Condition**: “Does the lead have a tag?” >> Yes, but including one of the tags >> Indicate the tag.

**Action**: Start chatbot >> Indicate the chatbot, the account type, and which WhatsApp account.\
Click Apply and Save and Close.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcS-4Z9C-9oz6RmV-X9cBTEWWsHQe6mMCXkrc1jVnb5rURLaY8bDCQFKtwus75IT--3cagYubdiLSgRKhhqnLhz68xRc98UKTsEmhq5tGU89wmN5GU7lGHIq5m2Gn8kFGGcVkFV9VVOj4TMj4cbNTerYvE?key=kBfnYrXDoyqIkjwQKonTpA" alt=""><figcaption></figcaption></figure>

**The next step is to import the opportunities already including the leads in the segment and containing the tag configured previously.**

To do this, follow the step-by-step below:

1 - Access CRM settings, then click Import Opportunities

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXegdakdGnMUSaiRV6QjXB8OiS4oMuNONNcEE65FFm5JJZMFt8-EgTGCI0oPpNUqI4qWPg9-E3T9FE3QEyVMzjrEvxTMsmSvVYvBcYM1NSoCIlwOz_7C5kvObMLtYD6iJx5Js0N6NLU8eVGUSCn5blTjjdmQ?key=kBfnYrXDoyqIkjwQKonTpA" alt=""><figcaption></figcaption></figure>

2 - The opportunities spreadsheet must contain the correct information regarding the columns that relate to the stages, and the person responsible. This information will be related by ID. Check the IDs on the buttons indicated below.

{% hint style="info" %}
It is mandatory that there is a title column, and that your spreadsheet does not have blank rows.
{% endhint %}

Select the file to be mapped by clicking on the file type.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcz6b5IzXU1AAKvVy_W_VplyfgOpWBJkeZMZlJz9LlVGUEcbsNI8BtueeGa_PcQK28ElZ8nAgDQ9E4wObYtDQ68KkKZ70CumdivlnmCj3IlzqhYwl3XPr3rfjunZHoxj_7GIO0XxM5kcEPpcjzcWef7ML4?key=kBfnYrXDoyqIkjwQKonTpA" alt=""><figcaption></figcaption></figure>

3 - At the time of import you can add the responsible employee, the segment, the tag, and the users who will be able to view the opportunities and service.

\
**It is important that** you add the segment and the tag configured in the automation above, so that these are served in order to trigger the chatbot.

\
Next you will see the mapped fields.&#x20;

* In the first part check if the fields of the opportunity columns are correct.&#x20;
* In the second part pay attention to the fields of the lead information.\
  Finally, click import opportunities.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfqqV4d4f9O7HUldUbZB_SXv74_9WodG7f6b0u7dbOITjnEMgu74pW4nfte6SxSqP5I91nDhnGcxsLwBFMy24ikjNuHGALdwllB8RQX6r3WhV-4gHcQxbcQCYkpCVNMvuMhPVGDt9ONbTLv3cCnvk-PRtUf?key=kBfnYrXDoyqIkjwQKonTpA" alt=""><figcaption></figcaption></figure>

\ <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-starting-chatbot-in-imported-opportunities.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.
