Skip to main content

Workflows and Threads

If you are following along, you should have the editor open in the browser. The first page you will see is the Workflow editor.

Workflow

A Workflow is a sequence of stages that are executed in a specific order. Each stage is a Python script that will be executed when the Workflow reaches that point in its run.

In this example, we have two stages, Apply to Dunder Mifflin and Application Review, represented by the boxes, and the arrow indicating the transition from one stage to the next.

Workflow Editor Page

In this Workflow, the first stage, Apply to Dunder Mifflin, is a Form that will request the user to answer a set of questions. The second stage, Application Review, is a Script that will process the data and send an email to the user with the application status.

Let's see the Workflow in action. Go to the Threads page by clicking on the "Threads" tab in the sidebar.

Threads Page

Threads

A thread is a single Workflow execution. It's created whenever a starting stage is triggered. Learn more about threads here.

Threads Page

Each column represents a stage in your Workflow and each card represents a thread. Cards move across stages according to the logic you set in the Workflow editor. Columns can be shown, hid and rearranged as you please.

To test this workflow, click on the "Start new thread" button on the "Apply to Dunder Mifflin" column. This will open the form in a new tab. After starting the form, you can check the new thread in the Threads page.

Start New Thread

While you are filling the form, the thread card will be running in the first stage.

Thread Running Card

After you finish filling the form, the card will automatically move to the next stage. Thread Finished Card

And you will receive an email with the application status.

And that's it! You have successfully run your first Workflow. To understand what happened behind the scenes, we have to understand what is happening in each stage.