# Workflow Builder

The workflow builder lets you create workflows from scratch. To begin your step-by-step journey, select New workflow on the right side of the **My workflows** page.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FIm34bFNlZDwZPw6NZZJe%2Fimage.png?alt=media&#x26;token=4dcb7f95-aaba-4205-9929-dcbca5f7dd0f" alt=""><figcaption><p>My workflows page</p></figcaption></figure>

Clicking this blue button will open the **workflow builder**, where you can design and edit your custom workflow.

If you install a [Template](https://docs.getmesa.com/templates), the workflow comes pre-built and the steps populate automatically. Selecting the installed template on the **My workflows** page will open the builder, where you can expand each step and make any necessary changes.

## Adding your trigger

The trigger is the first step in your workflow, which describes the event that needs to occur for your workflow to run. When building a new workflow, you'll see a list of apps to choose from. As you can see below, MESA integrates with numerous third-party apps.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FUUyMRvsqPVr3HsYCscx3%2Fworkflow-builder-trigger.png?alt=media&#x26;token=74b9c4d4-1631-4d39-85be-cfe45f95a621" alt=""><figcaption></figcaption></figure>

Once the app is selected, a list of events displays. You can browse the pre-populated list or use the filter field to search for a specific trigger. Here is an example of what displays when the Shopify app is chosen.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fo2xRHRZkZSYVidBSoLDc%2Fworkflow-builder-shopify-triggers.png?alt=media&#x26;token=5195f0e3-7490-47fa-bfb9-c9f6bd31b9e8" alt=""><figcaption></figcaption></figure>

Click [here](https://docs.getmesa.com/workflow-builder/triggers) to learn more about the different types of triggers and some of our commonly used triggers.

## Adding your first action

After selecting your trigger, three options will display: **Action**, **Filter**, and **Path**

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FAzywqatIrvJC6jWMFKK9%2Fworkflow-builder-actions.png?alt=media&#x26;token=005ff19a-ae97-4345-b9a9-c7d0c9c20382" alt=""><figcaption><p>Available options after your trigger step</p></figcaption></figure>

[**Actions**](https://docs.getmesa.com/workflow-builder/actions) will continue the process of displaying apps that you can select an event from. Some common examples of these are adding a Shopify tag or sending an email.

[**Filter**](https://docs.getmesa.com/tools/filter) allows you to set criteria that needs to pass in order for the workflow to proceed to the next step.

[**Paths**](https://docs.getmesa.com/tools/paths) will split the workflow into multiple paths, where you can set criteria for each segment to run.

{% hint style="info" %}
After selecting your first action, a pop-up will suggest a pre-built template depending on the trigger and action chosen. If the proposed template is not what you're looking to achieve, feel free to click the X at the top right of the pop-up.
{% endhint %}

## Difference between tools & steps

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2Fd5QBXGiNhGBKduBUREsc%2Fworkflow-builder-action-step.png?alt=media&#x26;token=fa0a8014-d68b-4a9c-ae77-244de00d5cf2" alt=""><figcaption><p>Here's what displays when selecting Action</p></figcaption></figure>

Our MESA team creates built-in tools in-house. These tools provide flexibility and allow you do more with your workflows. For example, you can use **Loop** to cycle through products in an order, then use **Filter** to see if a specific product was ordered.&#x20;

Steps, on the other hand, are simply any trigger, action, or tool in your workflow. Every time a new block is added to the workflow, that counts as a step.

## Configuring steps

When adding an action, especially in the case of third-party apps, you'll sometimes see a sub-menu for **Setup**. Expand this to include any additional details specific to that step.

For example, the **Setup** section in the **Form** trigger is where you can edit your form, copy the Form embed code, and copy or view the Form URL.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FnNb1ocebA0pnowop0cAo%2Fimage.png?alt=media&#x26;token=320a4df0-bf71-4a31-a359-d20412e488f8" alt=""><figcaption></figcaption></figure>

## Saving changes

Once all of your steps are properly configured and everything looks complete, click **Save changes** at the top right of the page.

MESA will autosave new steps as they are added for ease of use.

When configuring a step or adding any other details to the workflow, you will see a yellow "Unsaved changes" message appear to the left of the **Save changes** button. This is a good indicator to save your workflow changes before conducting a manual run or exiting the page.

<figure><img src="https://3425906282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1H6u1HQc3Iew7ATmmiCi%2Fuploads%2FKbx7kBwTKbu8rfPs1BzO%2Fworkflow-builder-save-changes.png?alt=media&#x26;token=ca3d60a6-b0d0-4dad-a6cb-ca45ed322109" alt=""><figcaption></figcaption></figure>

## Manually run steps & Manually run the entire workflow

It is important to manually run your automation setup as a final check before activating your workflow. Manual runs can be done on a step-by-step basis, or you can manually run the entire workflow in one go.

You can manually run an individual step by selecting the blue **Run step** button at the bottom of the step.

Alternatively, select the blue **Run workflow** button at the bottom of the workflow, or at the bottom of the trigger step, to manually run your completed workflow.

For more details and step-by-step instructions on Manual Runs, follow this [link](https://docs.getmesa.com/workflow-builder/testing).

## Enabling your workflow

Congrats on completing and successfully running your workflow!

The last step is to enable it so that it begins to run in real-time on live data. This can be done simply by toggling the Off button to On, which is located to the right of the Save Changes button.
