Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Check Shopify discounts against EU price rules with metafields and Gmail

When something happens in a connected app, it handles email using Gmail, Shopify.

What it does

## Check Shopify discounts against EU price-reduction rules Who it's for: EU Shopify merchants and the agencies that run their shops. Under the Omnibus Directive (Art. 6a of Directive 98/6/EC; in Germany PAngV section 11) the crossed-out "was" price of a sale must be the lowest price of the 30 days before the reduction. Shopify keeps no price history and accepts any compare-at price, so an inflated discount goes unnoticed. ### How it works 1. On every price change, and every night, each variant is read fresh from Shopify. 2. Today's price is added to a price history kept on the variant as a metafield. 3. Set nodes find when the sale started and the lowest price in the window before it. 4. Which Rule Applies? picks one outcome: history too short, not a real reduction, or "was" price too high. 5. Fixes run at once if you allow it and are emailed; everything else goes to the owner as a Fix it / Keep it email, one at a time. ### Setup 1. Create a Shopify Dev Dashboard app with read_products and write_products and connect it as a Shopify OAuth2 credential. 2. Connect Gmail. 3. Fill Set Pricing Rules: shop subdomain and owner email. ### Customization tips - Other windows: lookback_days sets the window; progressive_reductions follows Art. 6a(5). - Other rules: anything that compares a shown price with past prices reuses the history. Add an output to Which Rule Applies?. - Another shop system: only Product Price Changed, Read Every Product and the six HTTP nodes talk to Shopify. The decision needs just price, compare_at and history. - Another channel: swap the Gmail nodes for Slack or Teams. The history starts on the first run. Until a full window is logged, discounts go to the owner.

The steps

  1. Product Price Changed
  2. Every Night
  3. Set Pricing Rules
  4. One Product Or The Whole Shop?
  5. Read Every Product
  6. One Item Per Variant
  7. Read The Variant From Shopify
  8. Did Shopify Answer?
  9. Stop: Shopify Refused The Read
  10. Skip Variants That Were Deleted
  11. Read Price And History
  12. Did The Price Change Today?
  13. Add Today To The History
  14. Find The Lowest Earlier Price

41 steps in total.

Similar automations