> 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/tutorial-videos/automation-flow-running-chatbot.md).

# 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 support center.

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 setting up the automation, you will need to:

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

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

{% content-ref url="/pages/814f3ed48090f41c2a4a03be93aacb12f5def0df" %}
[Chatbot - Getting Started](/en/topics/convert/chatbot/chatbot-tutorial-videos/chatbot-getting-started.md)
{% endcontent-ref %}

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

{% content-ref url="/pages/d106b870c69df29766261e675cdcca35b75bf502" %}
[Tags](/en/topics/system-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 cases**, 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. Set up the action:

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

4. Save and activate the automation.

### How this scenario works

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

* Are within a specific segment
* Have a specific tag

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

### Other possible uses

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

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

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

{% hint style="danger" %}

### Warning

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

Pausing the automation prevents new entries into the flow, but does not interrupt executions already started.
{% endhint %}
