---
title: "Your first workflow, step by step"
description: "A screenshot-by-screenshot tutorial: build a Shopify Flow workflow with a Workflow Trigger Extensions trigger, add a condition on the old and new value, add an action, turn it on and verify it in Event History."
canonical: "https://docs.workflow-trigger-extensions.app/first-workflow-tutorial"
---

# Your first workflow, step by step

This tutorial builds one complete workflow from an empty Shopify Flow canvas: **alert the team when a price is marked down by more than 10 percent**. It uses Product Variant Price Changed, but every trigger of this app is used the same way, so the five moves below carry over to all of them.

You need the app installed and **Product, Variant & Collection Data Access** granted. If not, start with [Install and set up](https://docs.workflow-trigger-extensions.app/install-and-set-up.md).

## 1. Create a workflow and pick the trigger

Open **Shopify Flow** from your admin (Apps > Flow) and click **Create workflow**. Flow opens an empty workflow with a prompt field in the middle. For a trigger of this app, click **Select a trigger** below it.

![A new, empty Shopify Flow workflow with a prompt field and the buttons Select a trigger and Browse templates](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/65ba70a0a62b7488.png)
*A new workflow. For a trigger of this app click Select a trigger.*

In the panel that opens, open **Workflow Trigger Extensions**. Every trigger of the app is listed there with a one-line description. You can also type a name into the search field at the top. Pick **Product Variant Price Changed**.

![Flow's Select trigger panel with Workflow Trigger Extensions opened and its triggers listed with a description each](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/ce4c4db5acda7718.png)
*Every trigger of the app, each with a one-line description. The search field filters the list.*

The trigger is now the first step of the workflow. Its panel shows what the trigger sends along - that is the data your conditions and actions can use.

![The workflow canvas with Product Variant Price Changed as its first step](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/8647bdb0e84042a7.png)
*The trigger is the first step of the workflow.*

## 2. Add a condition

Click the **+** under the trigger and choose **Condition**. Click **Add criteria**: Flow opens the variable picker. Everything under the name of the trigger comes from this app.

For a price change that is `priceChange` with the old and the new price, the difference (`delta`), the percentage (`percentChange`) and the `direction`. These exist because a Flow condition cannot calculate, and money arrives as text - so the app does the arithmetic and hands you the result as a number.

![The plus under the trigger step opened, offering Action and Condition](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/f68c67160583e972.png)
*The plus under a step offers the two things a workflow is made of: a condition and an action.*

![Flow's variable picker showing oldPrice, newPrice, delta, percentChange and direction under priceChange](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/2e35e3b8d7425548.png)
*What the trigger hands to your workflow: the price before and after, the difference, the percentage and the direction.*

Pick `percentChange`, choose **Less than** and enter `-10`. The workflow now continues only for markdowns of more than 10 percent.

![A Flow condition: priceChange.percentChange is less than -10](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/94ccbc0b6eaa2fdd.png)
*The finished condition.*

> [!NOTE]
> **Old and new values are the point**
> Shopify's own triggers tell you what a record looks like **now**. They do not tell you what it was before, so a condition like "fell by more than 10 percent" or "went from draft to active" cannot be written with them. Every change trigger of this app carries the value before and after. See [How triggers work](https://docs.workflow-trigger-extensions.app/how-triggers-work.md).

## 3. Add an action

Under **Then**, click **+** and choose **Action**. For an alert, **Send internal email** is the simplest one: it needs no other app. Put variables into the text with **Add variable**, for example:

`{{productVariant.product.title}} / {{productVariant.title}}: {{priceChange.oldPrice.amount}} -> {{priceChange.newPrice.amount}} ({{priceChange.percentChange}} %)`

Anything Flow can do works here: add tags, update a metafield, send an HTTP request to Slack or your ERP.

### Optional: shape the data with Run code

When the text you want is more than a few variables - rounding, a fallback for an empty value, a calculation - add Flow's **Run code** step between the condition and the action. It receives the trigger's data as `input` and returns an object that later steps can use.

![Flow's Run code step reading oldPrice, newPrice and percentChange from the trigger](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/bf9f5c6af62afb64.png)
*Run code receives the trigger's data as input and returns values for the steps after it.*

## 4. Turn the workflow on

Give the workflow a name and click **Turn on workflow**. Flow tells the app that a workflow with this trigger is live, and the app does the rest:

- it switches the trigger on, and
- for a change trigger it reads the current state of the matching records once (the **baseline sync**), so that the very first change already has something to compare with.

On a large catalogue the baseline sync can take a few minutes. Until it has finished, the first change of a record may not fire.

![The finished workflow: trigger, condition, Run code, with Turn on workflow in the top right](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/81d1c81e80400669.png)
*The finished workflow. Turn on workflow is in the top right corner.*

## 5. Make the change and check Event History

Change the price of a test variant by more than 10 percent. Then open **Event History** in the app: every event the app sent to Flow is listed there with its status. **Success** means Shopify Flow accepted it.

![The app's Event History page listing fired triggers with their status](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/64c7c202a2242fd5.png)
*Event History lists every event the app sent to Shopify Flow.*

Click the event to see exactly what was sent - the same values your condition saw. If the workflow did not do what you expected, this is the first place to look: is the event there, and does it carry the values you assumed?

![An event opened in Event History: a price change from 89.00 to 69.00 with delta, percentChange and direction](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/a90cc4535aa4e00f.png)
*One event, opened: exactly the values your condition saw.*

> [!TIP]
> **If nothing shows up**
> - The permission for this kind of data is not granted: check **Permissions** in the app.
> - The trigger is switched off: check its switch on the **Triggers** page.
> - The change was not the kind this trigger watches (a compare-at price is one; an inventory change is not).
> - The baseline sync had not finished yet. Make the change once more.
>
> More in [Event history and troubleshooting](https://docs.workflow-trigger-extensions.app/event-history-and-troubleshooting.md).

## Where to go from here

Pick your area and follow the tutorial for the exact trigger you need:

- [Product triggers, step by step](https://docs.workflow-trigger-extensions.app/product-trigger-tutorials.md), [Product variant triggers, step by step](https://docs.workflow-trigger-extensions.app/variant-trigger-tutorials.md), [Inventory triggers, step by step](https://docs.workflow-trigger-extensions.app/inventory-trigger-tutorials.md), [Collection triggers, step by step](https://docs.workflow-trigger-extensions.app/collection-trigger-tutorials.md)
- [Order triggers, step by step](https://docs.workflow-trigger-extensions.app/order-trigger-tutorials.md), [Draft order triggers, step by step](https://docs.workflow-trigger-extensions.app/draft-order-trigger-tutorials.md)
- [Customer triggers, step by step](https://docs.workflow-trigger-extensions.app/customer-trigger-tutorials.md), [B2B company triggers, step by step](https://docs.workflow-trigger-extensions.app/b2b-company-trigger-tutorials.md)
- [Discount triggers, step by step](https://docs.workflow-trigger-extensions.app/discount-trigger-tutorials.md), [Metafield triggers, step by step](https://docs.workflow-trigger-extensions.app/metafield-trigger-tutorials.md), [Metaobject trigger, step by step](https://docs.workflow-trigger-extensions.app/metaobject-trigger-tutorials.md)
- [Market triggers, step by step](https://docs.workflow-trigger-extensions.app/market-trigger-tutorials.md), [Location triggers, step by step](https://docs.workflow-trigger-extensions.app/location-trigger-tutorials.md), [Blog and page triggers, step by step](https://docs.workflow-trigger-extensions.app/content-trigger-tutorials.md)
- [Storefront triggers, step by step](https://docs.workflow-trigger-extensions.app/storefront-trigger-tutorials.md), [Checkout triggers, step by step](https://docs.workflow-trigger-extensions.app/checkout-trigger-tutorials.md)

No trigger fits? Write your own: [Custom triggers](https://docs.workflow-trigger-extensions.app/custom-triggers.md).
