> ## Documentation Index
> Fetch the complete documentation index at: https://botpress.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

&#x20;Workflows are **sequences of steps that your bot takes**:

![Workflow](https://mintcdn.com/botpress/Lpe_dNeJOVvCwnlo/studio/concepts/assets/workflow.png?fit=max\&auto=format\&n=Lpe_dNeJOVvCwnlo\&q=85\&s=aecbf5cae001edb564406fb35ce4d18a)

Each Workflow represents a reusable, customizable section of your bot's logic. You can use them to organize your bot's behaviour. For example, you might want to:

* Greet users and offer assistance
* Validate a user response
* Collect personal data before checking out

Instead of having the logic for each of these tasks in one big sequence, you can put each one in its own Workflow. Then, just [transition](#transition-to-a-workflow) to whichever Workflow you need.

***

## Overview

Workflows are made up of [Nodes](https://botpress.com/docs/studio/concepts/nodes/) that determine their behaviour. You can modify the Nodes within a Workflow by dragging and dropping them.

Every Workflow you create has at least two Nodes:

* An **Entry Node** that executes whenever you transition to the Workflow
* An **Exit Node** which exits the current Workflow and returns to its parent Workflow

You can put any amount of Nodes in between these two—they'll execute in order when you transition to the Workflow.

> [!NOTE]
>
> You can [pass data between Workflows](https://botpress.com/docs/studio/concepts/variables/pass-between-workflows.md)—check out the
> [variables](https://botpress.com/docs/studio/concepts/variables/) section for more information.

***

## Built-in Workflows

Every bot comes with a few built-in Workflows to handle specific situations gracefully:

![Default Workflows](https://mintcdn.com/botpress/R0j83CJzQ82pelmj/studio/concepts/assets/default-workflows.png?fit=max\&auto=format\&n=R0j83CJzQ82pelmj\&q=85\&s=9166eca18d14fabae6858a8bd6a7ad8a)

You can modify the contents of each one to suit your needs. Here's a breakdown of each default Workflow.

### Main

The Main Workflow is the entry point for every conversation with your bot. It executes every time a new conversation begins:

![Main Workflow](https://mintcdn.com/botpress/R0j83CJzQ82pelmj/studio/concepts/assets/main-workflow.png?fit=max\&auto=format\&n=R0j83CJzQ82pelmj\&q=85\&s=8fe1a5541a79fa0d9aa08a23a3b767c3)

Unlike custom Workflows, the Main Workflow always contains:

* A [Start Node](https://botpress.com/docs/studio/concepts/nodes/introduction.md#start-node) that starts the conversation
* An [End Node](https://botpress.com/docs/studio/concepts/nodes/introduction.md#end-node) that ends the conversation

### Error

The Error Workflow executes when there's an unexpected error in one of your other Workflows. You can use it to inform the user that something went wrong:

![Error Workflow](https://mintcdn.com/botpress/R0j83CJzQ82pelmj/studio/concepts/assets/error-workflow.png?fit=max\&auto=format\&n=R0j83CJzQ82pelmj\&q=85\&s=d71a273c24c75082e083f9fdf27bc19d)

Instead of an **Exit** Node, the Error Workflow contains an **End** Node. This ensures that the conversation ends after the error occurs.

### Timeout

The Timeout Workflow executes after a period of prolonged inactivity from the user. You can use it to inform the user that the conversation timed out:

![Timeout Workflow](https://mintcdn.com/botpress/Lpe_dNeJOVvCwnlo/studio/concepts/assets/timeout-workflow.png?fit=max\&auto=format\&n=Lpe_dNeJOVvCwnlo\&q=85\&s=d01cc589e9d097e3fec13129d29a2d98)

Instead of an **Exit** Node, the Timeout Workflow contains an **End** Node. This ensures that the conversation ends after the timeout occurs.

> [!TIP]
>
> You can set a custom timeout delay in your [Bot Settings](https://botpress.com/docs/studio/concepts/bot-settings.md).

### Conversation End

The Conversation End Workflow executes right before the conversation ends explicitly. You can use it to summarize the conversation before it ends, or offer follow-up actions:

![Conversation End](https://mintcdn.com/botpress/R0j83CJzQ82pelmj/studio/concepts/assets/end-workflow.png?fit=max\&auto=format\&n=R0j83CJzQ82pelmj\&q=85\&s=cb6dbbf52e11283f1bc491b6d64c16c9)

Instead of an **Exit** Node, the **Conversation End** Workflow contains an **End** Node. This ensures that the conversation ends after the Workflow executes.

> [!NOTE]
>
> The **Conversation End** Workflow only executes before the conversation ends explicitly—that is, when a Workflow transitions to an [End Node](https://botpress.com/docs/studio/concepts/nodes/introduction.md#end-node).
>
> Since Autonomous Nodes don't transition to an End Node when the user ends the conversation, they won't transition to the Conversation End Workflow by default.

***

## Add a Workflow

To add a new Workflow, navigate to the **Workflows** menu in Studio:

![Workflows section](https://mintcdn.com/botpress/Lpe_dNeJOVvCwnlo/studio/concepts/assets/workflows-menu.png?fit=max\&auto=format\&n=Lpe_dNeJOVvCwnlo\&q=85\&s=e3257fd829222197a42b229ed07bc76d)

Then, select **Create Workflow** and enter a name for the new Workflow:

![New Workflow](https://mintcdn.com/botpress/R0j83CJzQ82pelmj/studio/concepts/assets/new-workflow.png?fit=max\&auto=format\&n=R0j83CJzQ82pelmj\&q=85\&s=477f1d04960a7ede466e4ab1ba7131f5)

### From Botpress Hub

You can also browse [Botpress Hub](https://botpress.com/docs/integrations/get-started/botpress-hub.md) for user-uploaded Workflows and add them to your bot. Just filter by Workflow to see all available Workflows:

![Workflows on Hub](https://mintcdn.com/botpress/Lpe_dNeJOVvCwnlo/studio/concepts/assets/workflows-hub.png?fit=max\&auto=format\&n=Lpe_dNeJOVvCwnlo\&q=85\&s=e33029e26d7faaf1540a12565d77903f)

To add any Workflow, select it, then select **Install Workflow**.

> [!TIP]
>
> To edit a Workflow you installed from Botpress Hub, you need to make a copy of it within your bot. After installing,
> select **Make a copy and Edit**—the Workflow will then open in Studio.

***

## Transition to a Workflow

Any Workflows you add are available as a [Card](https://botpress.com/docs/studio/concepts/cards/) from the **Flow Logic** section of the Card tray:

![Flow Logic](https://mintcdn.com/botpress/R0j83CJzQ82pelmj/studio/concepts/assets/flow-logic.png?fit=max\&auto=format\&n=R0j83CJzQ82pelmj\&q=85\&s=04f120b9b2a3121e8abf9108e62cb0b1)

To transition to a new Workflow, just add it to the Node you want to transition from:

![Transition Card](https://mintcdn.com/botpress/Lpe_dNeJOVvCwnlo/studio/concepts/assets/transition-card.png?fit=max\&auto=format\&n=Lpe_dNeJOVvCwnlo\&q=85\&s=0d0f101840127b3049ed590da297ae31)

***

## Group Workflows in folders

You can group Workflows into folders to keep them organized:

![Workflow folders](https://mintcdn.com/botpress/Lpe_dNeJOVvCwnlo/studio/concepts/assets/workflow-folders.png?fit=max\&auto=format\&n=Lpe_dNeJOVvCwnlo\&q=85\&s=7d695f6b48f4c90bdc9b92ec893892ca)

Just select **Add Folder** in the Workflows menu to create a new folder. Then, you can drag any Workflows (or sub-folders) you want into the folder.

***

## Share a Workflow

You can share any Workflow you create on [Botpress Hub](https://botpress.com/docs/integrations/get-started/botpress-hub.md) to make it available to other users. Just select **Share Workflow**  in the upper-right corner of the Workflow and fill out the required fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.