# Preview actions in a workflow

Preview mode lets you simulate how an action works using real data, so you can verify everything is set up correctly before activating your workflow.

This helps you avoid mistakes and ensure your automation runs exactly as expected.

## When to use Preview mode

Use Preview mode when you want to:

* Check how your **email content** will appear
* Verify **dynamic variables** (customer name, product info, etc.)
* Test your workflow setup before publishing
* Make sure the right data is used in each action

## What happens when you run a preview

Preview mode simulates how actions work using sample data.

For some actions (such as **Send email** and **Send internal email**), a test email will be sent to the selected recipient.

<table><thead><tr><th width="348">Action</th><th>Preview mode</th></tr></thead><tbody><tr><td>Send email</td><td>Send a preview of the email using selected data</td></tr><tr><td>Send internal email</td><td>Send a preview of the email using selected data</td></tr><tr><td>Send push notification</td><td>Simulate the action output</td></tr><tr><td>Wait</td><td>Simulate the delay logic</td></tr><tr><td>Create discount code</td><td>Simulate discount creation</td></tr><tr><td>Update subscription status</td><td>Simulate status update</td></tr><tr><td>Add customer tags</td><td>Simulate tag assignment</td></tr></tbody></table>

## How to preview an action

{% hint style="success" %}
**Steps:**

1. Go to **Workflows** in your XFlow dashboard.
2. Open the workflow you want to edit.
3. Click on an **action node** (e.g. *Send email*).
4. In the right-side panel, click **Preview**.
   {% endhint %}

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

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

### Set up preview data

To simulate a real workflow run, you need to provide sample data:

* **Customer**: Select a customer to test personalization
* **Product**: Select a product to test restock-related content

These inputs allow XFlow to replace dynamic variables with real values in your preview.

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

### Run preview

1. After selecting the data, click **Run preview**.
2. XFlow will simulate the action using your current settings.
3. Review the output (e.g. email content) to ensure everything looks correct.

{% hint style="warning" %}

* Preview mode only simulates the action using sample data
* Your live workflow and customers are not affected
* You can safely test multiple scenarios before publishing.
  {% endhint %}

## Related articles

{% content-ref url="/pages/bT9FkyAd7rwAtkDEzWM0" %}
[Understanding workflow actions](/xflow-app/workflows/understanding-workflow-actions.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/2vPjRx3iv0sn0W8FiqsT" %}
[Assign a workflow to your campaign](/xflow-app/workflows/assign-a-workflow-to-your-campaign.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_how_to_preview_actions&#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/preview-actions-in-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.
