Check Shopify discounts against EU price rules with metafields and Gmail
Ready for 3.0What this workflow does
This workflow has 41 nodes and runs on Shopify events (plus 1 other trigger). Along the way it connects Shopify and Gmail.
How it runs
Trigger: On Shopify events (plus 1 other trigger).
- Set Pricing Rules (Edit Fields (Set)): sets 10 fields: shop_subdomain, api_version, owner_email…
- One Product Or The Whole Shop? (If): checks a condition and branches into true / false
- One Item Per Variant (Split Out): splits a list into separate items
- Read Every Product (Shopify): get many (product)
- Read The Variant From Shopify (HTTP Request): calls an HTTP API (POST)
- Did Shopify Answer? (If): checks a condition and branches into true / false
- Skip Variants That Were Deleted (Filter): keeps only the items that match a condition
- Stop: Shopify Refused The Read (Stop and Error): stops the run with an error
- Read Price And History (Edit Fields (Set)): sets 8 fields: variant_id, product_id, product_title…
- Did The Price Change Today? (Edit Fields (Set)): sets 3 fields: on_sale, history_changed, sale_started
…plus 29 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (15)
- Shopify Trigger
n8n-nodes-base.shopifyTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Shopify
n8n-nodes-base.shopify - Split Out
n8n-nodes-base.splitOut - HTTP Request
n8n-nodes-base.httpRequest - Stop and Error
n8n-nodes-base.stopAndError - Filter
n8n-nodes-base.filter - Switch
n8n-nodes-base.switch - Merge
n8n-nodes-base.merge - Aggregate
n8n-nodes-base.aggregate - Gmail
n8n-nodes-base.gmail - Limit
n8n-nodes-base.limit - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
Quick overview In the EU, a discount must show as its old price the lowest price of the last 30 days. Shopify does not keep price history, so this workflow keeps it for you and fixes or flags discounts that break the rule. How it works 1. It runs every time a…