Start a workflow from Shopify Flow

If you already use Shopify Flow, you do not have to choose. The Flow action Run a Workflow Suite workflow starts one of your Workflow Suite workflows from any Flow workflow, with data from that Flow workflow. Flow decides when; Workflow Suite does the work: code steps, HTTP requests, files, loops, retries and everything else a workflow can do.

The other direction, a Workflow Suite workflow starting a Flow workflow, is Send events to Shopify Flow.

What you need

  • Shopify Flow installed on your store. It is free.
  • Nothing to connect: Workflow Suite adds its action to Flow when you install it.

1. Create the workflow in Workflow Suite

  1. Create a workflow and choose the trigger Started from Shopify Flow (group Manual and schedule).
  2. Build the steps. They read what Flow sent:
Path What it holds
event.payload.data The JSON of the action's Data field, with Flow's variables filled in
event.payload.resource_id The action's Resource ID field, or empty
event.payload.action_run_id Flow's id for this step of the Flow run
  1. Save and select Turn on. Flow can only start a workflow that is on.

For example, a workflow that tags every product Flow sends: one Add product tags step with the product id {{ event.payload.resource_id }}.

The workflow Tag products sent by Shopify Flow in the editor: the trigger Started from Shopify Flow, the steps Tag the product and Log what Flow sent, and the trigger panel explaining data and resource_id
The workflow in Workflow Suite: the trigger Started from Shopify Flow and two steps that read what Flow sent.

2. Add the action in Shopify Flow

  1. In Shopify Flow, create a workflow and pick any trigger, for example Product created.
  2. Add an action, open Workflow Suite and pick Run a Workflow Suite workflow.
  3. Fill in Data (JSON): a JSON object with Flow's variables inside quotes.
{"title": "{{ product.title }}", "vendor": "{{ product.vendor }}"}
  1. Fill in Resource ID with the id the run is about, for example {{ product.id }}. It is optional, but it lets loop protection recognise a loop (see below).
  2. Select Choose a workflow. Our configuration page opens inside Flow: pick the workflow, select Save, then Exit. The list only shows workflows with the trigger Started from Shopify Flow.
  3. Turn the Flow workflow on.

Flow checks the step before it turns the workflow on. It tells you when no workflow is chosen, when the chosen workflow is turned off or was deleted, and when the Data field is not valid JSON.

Typing in the Data field: Flow's editor closes {{ for you and adds }}. Type the variable name, then move the cursor to the end with the End key before you go on, and check the quotes at the end.

Shopify Flow's Select action panel opened on the app Workflow Suite, built by Code Creation Labs GmbH, with the action Run a Workflow Suite workflow and its description
In Shopify Flow, the action is under the app Workflow Suite.
The Run a Workflow Suite workflow step in Shopify Flow after the trigger Product created: Data (JSON) with the product title and vendor as Flow variables, Resource ID set to product.id, and the chosen workflow Tag products sent by Shopify Flow with a Change workflow button
The action after Product created: Data and Resource ID use Flow's product variables; the chosen workflow is shown below them.
The configuration page of Run a Workflow Suite workflow inside Shopify Flow: the Workflow select set to Tag products sent by Shopify Flow, the note that only workflows with the trigger Started from Shopify Flow are listed, and a Save button
Choose a workflow opens this page inside Flow. Pick the workflow, Save, then Exit.

What happens when it runs

  • The Flow step starts the workflow and finishes at once; it does not wait for the run. A workflow with a Wait step works fine.
  • The run shows in the run history of the workflow in Workflow Suite, like any other run.
  • Flow gets an answer it can use in later steps: started (true or false), status and message. status is STARTED, FILTERED (the workflow's trigger filter did not match) or SUPPRESSED (the plan's run limit or loop protection; the run history says why).
  • Every started run counts as one run on your plan. Filtered runs are free. See Plans, runs and extra runs.
  • When Flow retries the same step, no second run starts.
  • The trigger filter of the workflow applies, like for every trigger. See Trigger filters.
A Shopify Flow run of Send new products to Workflow Suite: Product created and Run a Workflow Suite workflow both succeeded, and the step data shows the data Flow sent with the real product title, vendor and product id
A real run in Flow: a new product started the Flow workflow and the step handed the product over to Workflow Suite.
Run 43 in Workflow Suite: the workflow Tag products sent by Shopify Flow completed in 1.8 seconds, Tag the product and Log what Flow sent succeeded, and the trigger event shows the data, resource_id and action_run_id Flow sent
The same run in Workflow Suite, three seconds later: the product was tagged, and the event shows exactly what Flow sent.

Loops between Flow and Workflow Suite

A Flow workflow that starts a Workflow Suite workflow that changes the same product, which starts the Flow workflow again, is a loop. Set Resource ID: when one workflow runs more than 10 times in 60 seconds for the same resource, Workflow Suite turns it off and tells you. See Loop protection.

Personal data

Whatever you put into the Data field is stored with the run, encrypted, and shown in the run history. Only send what the workflow needs.