What is the Workflow Builder?

The Workflow Builder in Cortex simplifies the process of creating and managing workflows. A workflow consists of sequential steps that process data, make decisions, and automate complex processes with ease.

For example, you could set up a workflow that automatically categorizes incoming documents using your predefined categories, then either displays the results or forwards them to another system.

In this section, we’ll focus on how to build a workflow, rather than exploring all the details of workflows in Cortex. To learn more about workflows in Cortex, check out the Workflows section:

Workflows

Workflows process your data through a series of steps to achieve your desired outcome.

How It Works

A workflow in Cortex operates like an assembly line, processing data through a series of connected steps.

  1. Input: The workflow starts by collecting data through input fields. These could be text entries, file uploads, or other types of user input.

  2. Steps Processing: Each step in the workflow performs a specific operation on the data. Steps can transform data, make decisions, apply AI models, or trigger actions based on your workflow’s needs.

  3. Data Flow: Data flows from one step to the next, with each step’s output becoming input for subsequent steps. Steps can be connected in various ways to create complex processing logic.

  4. Output: The workflow concludes by producing an output - this could be displayed results (including rich Markdown content and Mermaid diagrams) or triggered actions in other systems.

Create a Workflow

To create a workflow, navigate to the Workflows page in the Cortex dashboard and click the New Workflow button. Enter a descriptive name for your workflow and click Create Workflow.

When you first open the Workflow Builder, you’ll see a simple default workflow with:

  • Input containing a Text field where users can enter messages
  • A Model step that uses an LLM model to respond to the entered text

To quickly test how the workflow works, try entering a message in the Text field and clicking Run - you’ll see the LLM model process your input and generate a response.

Learning Path

Let’s walk through the key concepts you’ll need to master to build powerful workflows in Cortex. The sections below are arranged in a specific order, with each topic building on knowledge from previous sections.

For the best learning experience, we recommend following these core steps sequentially to learn the fundamentals of workflow building. These steps will give you a solid foundation and enable you to create effective workflows. After completing the learning path, you can explore the advanced concepts to build even more sophisticated workflows.

Make sure to carefully read through each section and watch all included videos and images—these visual aids are essential for fully grasping the concepts being discussed.

1

Learn Input Fields

Start by understanding input fields - the entry point of every workflow. Input fields collect data from users that flows through subsequent steps.

Input

Learn about different input field types and their configuration options.

2

Master Workflow Steps

Next, explore the various types of workflow steps and how to combine them effectively.

Steps

Discover the different step types and how to use them in your workflows.

3

Understand Data Flow

Learn how to access input data in steps and use the output of steps in subsequent steps.

Data Flow

Master data flow patterns and step connections.

4

Structure Your Output

Learn how to output results from your workflow in a clear and useful format, whether displaying them in the UI or returning them via API.

Output

Master the essentials of formatting and structuring workflow outputs.

5

Deploy Your Workflow

After completing these core steps, you’ll have the essential knowledge needed to build effective workflows in Cortex. You’ll be able to create workflows that handle input data, process it through various steps, and produce meaningful outputs.

Advanced Concepts

Once you’re comfortable with the fundamentals and have built a few basic workflows, you can enhance your skills by exploring advanced features:

These advanced concepts will help you create more complex and powerful workflows, but they’re best approached after you’ve mastered the basics through the learning path above.

Tutorials and API Integration

After mastering both fundamental and advanced concepts, you can explore practical examples and integration options:

These resources will help you apply your knowledge in practical scenarios and integrate workflows into your applications.

Happy building!