# Automation Flow - Running Chatbot

Imagine that you want to send messages from a chatbot to specific leads, even without a conversation previously started in the SAC.

With this flow, it is possible to automatically trigger a chatbot for contacts that meet criteria defined by you.

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

***

#### Prerequisites

Before configuring the automation, it will be necessary to:

* Create a chatbot
* Create a segment
* Create a tag

> Refer to the specific articles for each setup if you need to carry out these steps first.

{% content-ref url="/pages/814f3ed48090f41c2a4a03be93aacb12f5def0df" %}
[Chatbot - First Steps](/en/topics/convert/chatbot/chatbot-tutorial-videos/chatbot-first-steps.md)
{% endcontent-ref %}

{% content-ref url="/pages/430a797159546371edd1e2fbb2a4fe8a2e3ddca4" %}
[Segments](/en/topics/relate/segments.md)
{% endcontent-ref %}

{% content-ref url="/pages/d106b870c69df29766261e675cdcca35b75bf502" %}
[Tags](/en/topics/settings/tags.md)
{% endcontent-ref %}

### Flow setup

Access:

**Menu → Relate → Automation Flow**\
**Or** type the function in **Find services**.

1. Click on **Create new automation**
2. Add the desired conditions:
   * Contact belongs to segment X
   * Contact has tag Y

> **Note:** If you want to use condition fields from **Opportunities, Tasks and/or Service Requests**, it is necessary to indicate them in the **Automatic Selector**. To learn more about this feature, see the article below.

{% content-ref url="/pages/1edbad80a69ccb55e7e4bd2f2dd00df65b1941c4" %}
[Automatic Selectors](/en/topics/relate/automation-flows/automatic-selectors.md)
{% endcontent-ref %}

3. Configure the action:

* **Run Chatbot**
* Select the desired chatbot

4. Save and activate the automation.

### How this scenario works

In this example, the automation will be executed only for leads that:

* Are within a specific segment
* Have a certain tag

Only the contacts that meet these conditions will receive the chatbot sent by the flow.

### Other possible uses

This is just one example with **segments + tags**, but the feature can be used in several other condition scenarios, such as:

* Contacts with a specific owner
* Leads at a certain stage of the funnel
* Contacts with filled custom fields
* Specific capture source
* Rules combined with multiple conditions

This allows you to create more strategic automations according to your operation.

{% hint style="danger" %}

### Alert

Even if the automation is paused later, **contacts that have already started interacting with the chatbot will continue executing the actions defined within it until the flow is completed**.

Pausing the automation prevents new entries into the flow, but does not interrupt executions already started.
{% 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/tutorial-videos/automation-flow-running-chatbot.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.
