Shopify Flow is an event-based feature that lets you to create automated workflows, similar to tools like Zapier. It monitors your store for events, and lets you create automated actions in response. To create these automations, you build a workflow that begins with a trigger, and has optional conditions which then result in taking action. Let me show you how you can get your first Shopify Flow Workflow in under 5 minutes.
Prefer video?
Enjoy, otherwise read on!
Add Flow to Store
If you create a new development store in your Shopify Partner dashboard than Flow should be automatically installed. However, if your adding to an existing store you can simply search for it in the Shopify App Store and add it to your theme.
Create Workflow
First navigate to your ‘Apps’ and select ‘Flow’. From here you will have the options to browse existing templates or create a new workflow. Browsing templates is a handy way to add pre-made workflows that simply work out of the box. If your looking for something simple, than you may just find it in the templates. However we are going to create a workflow from scratch, so click ‘Create workflow’.
Now, recall that each workflow consists of a trigger, condition and action.
Workflow Component | Description | Example |
Trigger | A trigger is an event that starts a workflow, and can be something that happens in your store or in an app. | A new order is created in your store. |
Condition | A condition determines whether an action is taken, based on the conditions that you set. | A condition is set to check whether the total amount paid for the order is over 200 USD. |
Action | An action is a change that’s made to your store or in an app when the condition is met. | If the total amount paid for the order is over 200 USD, then a tag is added to the account of the customer who placed the order. |
In this example we are going to add an email notification when our product is out of stock. So after clicking ‘Create workflow’, click on ‘Select a trigger’. Triggers can be created from Shopify’s native events or apps that have been configured to create events. In this case we are going to select ‘Shopify’ and search for ‘product variant out of stock’:
Now we will click “Then”. At this point we could create some criteria if we wanted to only create this notification for specific products matching an ID or are over a specific price. But in this example, I want to keep it simple and send on any product that is out of stock so click ‘Action’ and then ‘Flow’ to select an action available from Flow. We want the ‘Send internal email’ action.
From here simply enter the required information. In this example, I am going to set the Subject to ‘Product out of stock’ and then I will enter a variable in the email message by clicking ‘Add a variable’ in the bottom right corner, then selecting ‘Product Variant’ which will give me a list of all the data available on the product variant.
I am going to select ‘displayName’ in the list. After selecting ‘displayName’, the message body should read: “Inventory for {{productVariant.displayName}} is gone!”. The curly braces will substitute the product variant name in when the email is actually sent.
Now we can simply click ‘Turn on Workflow’ in the corner and we’re in business. Now we’re ready to test.
Test your Flow Workflow
Within your store dashboard, navigate to Products -> Inventory and change the number of available units of one product to 1. Then you can preview your theme and add that product to cart, and checkout.
Ensure you have ‘bogus gateway’ enabled in Settings -> Payments to allow for fake checkout.
In the checkout form, add a single ‘1’ as the card number and a valid expiration date and any 3 digits.
After clicking ‘Pay now’ and seeing a confirmation order screen, you can navigate back the Flow dashboard where you should see that it was ‘Last Run’ ‘just now’. And after a moment or two, we should receive an email:
Conclusion
This is a very simple example to get started with Shopify Flow, but you can quickly see the various use cases for these workflows bringing value to your store. I hope you’ve enjoyed this tutorial and stay tuned for more Shopify content!