# Create a workflow

<figure><img src="/files/nMFA68XoqGuk7kgqIUiP" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

## Before you begin

✨ Want a head start? Use our **workflow templates library**: [Get started with workflow templates library](/xflow-app/workflows/get-started-with-workflow-templates-library.md)
{% endhint %}

## Create and set up a workflow

{% stepper %}
{% step %}

### Create a workflow

{% hint style="success" %}

1. In the **XFlow** dashboard, go to the **Workflow** section&#x20;
2. Click **Create workflow** to start a new workflow.
   {% endhint %}

<figure><img src="/files/9C3Bo0RPmqsWqXVB5lRt" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Define workflow name and trigger**

Enter a name and select a workflow trigger (**Product restock** or **New subscriber**) to set up your new workflow.

{% hint style="info" %}
Learn more: [Understanding workflow triggers](/xflow-app/workflows/understanding-workflow-triggers.md)
{% endhint %}

<figure><img src="/files/JRC6JWjYvHB4d2yd7ivE" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Start creating a workflow**

{% hint style="info" %}
Not sure how workflows work yet? Check out [How workflows work](/xflow-app/workflows/how-workflows-work.md)
{% endhint %}

Click the plus (<img src="/files/NaxtRbjwghtGd38WyzgF" alt="" data-size="line">) icon to add a **condition** or **action**, and build your workflow according to your needs.&#x20;

Hover over the block to **change** or **delete** the workflow block.&#x20;

<figure><img src="/files/cixXoQ5hSavAu9htypOf" alt=""><figcaption></figcaption></figure>

Click the block and select **Edit description** to add a custom description for your workflow.

<figure><img src="/files/k7iOkOY462LN3Xu99AAM" alt=""><figcaption></figcaption></figure>

For a workflow condition, you can choose either the **True** or **False** branch to continue building the next actions.

<figure><img src="/files/jPlkA1rs0H2Wdr74KSir" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Set up your workflow**

Select an available **action** or **condition** to define what happens in your workflow.

{% hint style="info" %}
👉 Check out these articles to learn more about workflow conditions and actions:

* [Understanding workflow conditions](/xflow-app/workflows/understanding-workflow-conditions.md)
* [Understanding workflow actions](/xflow-app/workflows/understanding-workflow-actions.md)
  {% endhint %}

<figure><img src="/files/EZbbGDa6Dvk7nuQ0mkTL" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Run your workflow**

Click **Save** and **Turn on workflow** to run the workflow you just created.

<figure><img src="/files/R5KvDfNIhRagv6vHeeOD" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### **Your workflow has been activated!**

You can check again in the Workflow dashboard; the **Active** button is now turned **green**, indicating that the workflow is enabled.

<figure><img src="/files/WZz9M6xo0fWedShruyGm" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Best practices for creating workflows

{% hint style="info" icon="star" %}
**Pro Tip:**

* Start faster by using our **workflow template library** instead of building from scratch: [Get started with workflow templates library](/xflow-app/workflows/get-started-with-workflow-templates-library.md)
* After setting up your workflow, don’t forget to test it to make sure it works as expected: [Test an email campaign](/xflow-app/campaigns/test-an-email-campaign.md)
* Keep an eye on how your workflow runs: [Manage workflows](/xflow-app/workflows/manage-workflows.md#recent-runs)
* A well-designed workflow follows clear logic and helps you reach the right customers at the right moment, without unnecessary or missing steps: [Common mistakes when creating workflows](/xflow-app/workflows/workflows-faqs/common-mistakes-when-creating-workflows.md)
  {% endhint %}

## Related articles

{% content-ref url="/pages/2vPjRx3iv0sn0W8FiqsT" %}
[Assign a workflow to your campaign](/xflow-app/workflows/assign-a-workflow-to-your-campaign.md)
{% endcontent-ref %}

{% content-ref url="/pages/bM5fPNbEmCRIJ60OltFF" %}
[Email templates](/xflow-app/email-templates/overview.md)
{% endcontent-ref %}

{% content-ref url="/pages/3ajXS0dZtcdbezZlA3XI" %}
[Available triggers, actions, and conditions](/xflow-app/workflows/available-triggers-actions-and-conditions.md)
{% endcontent-ref %}

{% content-ref url="/pages/ysIRvkTDPOhSe8lcYMTT" %}
[Manage workflows](/xflow-app/workflows/manage-workflows.md)
{% endcontent-ref %}

{% content-ref url="/pages/xa7meJEaLhnWD4ufvp9v" %}
[Workflows: FAQs](/xflow-app/workflows/workflows-faqs.md)
{% endcontent-ref %}

***

#### 📩 **Need help?**

We’re here to make your XFlow experience smooth and successful.\
Our support team is always ready to assist you—no matter how big or small your question is.

<a href="https://admin.shopify.com/apps/xflow?chat=true&#x26;utm_source=foxecom&#x26;utm_medium=help_center_xflow_create_a_workflow&#x26;utm_campaign=cta_button&#x26;utm_term=chat_now" class="button primary" data-icon="comment-lines">Chat now</a> <a href="mailto:contact@help.xflow.so" class="button secondary" data-icon="envelopes">Message us</a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.foxecom.com/xflow-app/workflows/create-a-workflow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
