Botpress Cloud: Studio Interface
Workflows

A flow allows you to break down a complex chatbot into multiple smaller flows. Breaking down the chatbot into multiple flows makes it easier to maintain, and you can re-use these flows when building other flows or even other chatbots.
A workflow always starts at its Entry Node At the beginning of each conversation, the Start Node of the Main flow of the Global Topic is the first to be executed. When the conversation reaches a node, Botpress will queue the active node's instructions and execute them in the order they were added to the node.
The flow is event-based and non-blocking by default, meaning it will execute all the nodes and instructions until it needs to wait
In other words, once the Entry Node is processed, the flow will continue to proceed to the next node in the flow until it reaches the very end of the flow or until a node needs to “wait” for user input.
Global Flows
Global flows in Botpress are essential components of the chatbot's functionality and cannot be deleted. These flows serve as the foundation for handling various important aspects of the chatbot's behavior and interactions.
While you cannot delete global flows, you can modify and customize them to suit your specific needs. You can add new actions, adjust the workflow logic, and incorporate additional functionality within the existing global flows. This allows you to extend the capabilities of the chatbot while maintaining the essential system-level functionality provided by the global flows.
Main
This is the primary conversation path that the chatbot follows in order to achieve its main purpose.
For example, if the chatbot is designed to provide customer service for a particular product, the Main Flow would include steps to gather information about the customer's issue, provide potential solutions, and ultimately resolve the problem.
The Main Flow is typically the most detailed and complex flow in the chatbot's design, as it needs to account for a wide range of possible inputs and scenarios.
Error
The Error Flow is designed to handle unexpected user inputs that don't fit within the parameters of the Main Flow.
This can include misspelled or misunderstood words, off-topic questions, or input that doesn't make sense in the context of the conversation.
The Error Flow should provide clear feedback to the user that their input was not understood and prompt them to provide more specific or relevant information.
Depending on the design of the chatbot, the Error Flow may offer suggestions for alternative input, or it may direct the user to a specific resource or human representative for further assistance.
Timeout
The Timeout Flow is triggered when the chatbot doesn't receive a response from the user for a certain period of time.
This can happen if the user is distracted or if there is a delay in their internet connection.
The Timeout Flow should provide a prompt or question to the user to encourage them to continue the conversation, and it may also include a message explaining why the chatbot has paused the conversation.
The Timeout Flow is important because it helps prevent the chatbot from appearing unresponsive or disconnected, which can lead to user frustration and disengagement.
Conversation End
The Conversation End Flow is designed to wrap up the conversation in a way that feels natural and satisfying to the user.
Depending on the context and purpose of the chatbot, this may involve thanking the user for their input and inviting them to provide feedback or continue the conversation later, or it may involve providing specific next steps for the user to take.
The Conversation End Flow is an important part of the chatbot design, as it helps create a positive user experience and encourages users to return in the future.
Custom Workflow
It's important to note that you can create and manage custom workflows alongside the global flows to implement specific business logic and custom behavior. This way, you can enhance the chatbot's functionality without compromising the integrity of the global flows.
By clicking on the "Add Workflow" icon located at the top of the Explorer Menu, you gain the ability to create custom workflows for your chatbot. Workflows are a crucial aspect of chatbot development as they define the logic and flow of conversations between the bot and its users.
Creating custom workflows allows you to tailor the behavior of your chatbot according to your specific requirements and use cases.
Here are some key benefits and possibilities of creating custom workflows:
- Designing Conversational Flows: Workflows enable you to design conversational flows that guide the interaction between the chatbot and users. You can define the sequence of messages, questions, and responses to create engaging and meaningful conversations.
- Implementing Business Logic: Custom workflows empower you to incorporate complex business logic into your chatbot. You can define conditions, triggers, and actions based on user inputs or specific events to provide dynamic and context-aware responses.
- Integration with External Systems: Workflows allow you to integrate your chatbot with external systems and APIs. You can utilize custom workflows to fetch data from databases, invoke web services, or perform any other necessary operations to enrich the user experience and provide relevant information.
- Handling User Input: With custom workflows, you can capture and process user input in a structured manner. You can define prompts, validate input, and handle different scenarios based on user responses, ensuring a smooth and interactive conversation flow.
- Implementing Advanced Features: Custom workflows enable you to implement advanced features such as user authentication, session management, context preservation, and more. These features enhance the functionality and capabilities of your chatbot, allowing for a more sophisticated user experience.
Execute Workflow
After building a few flows, you'll quickly notice that there are some common patterns that you find yourself implementing over and over. These can be seen as reusable components between multiple flows. So, you can create Folders to categorise your workflows.
Once you have created your workflow, right-click in the Flow Editor, hover over the Execute Workflow option and select your workflow.
Workflow Variables
Learn more about using workflow variables