π€ Send wholesale and B2B order email alerts with Shopify and SMTP
β‘ 1 views Β· π€ CRM & Sales Operations
Description
Quick Overview
This workflow triggers on new Shopify orders, checks whether they match your wholesale/B2B criteria using the Shopify Admin GraphQL API, and sends an HTML email alert via SMTP when a qualifying order is detected.
How it works
- Triggers in Shopify when a new order is created.
- Loads configurable settings such as shop subdomain, wholesale tag, minimum order value, and alert email addresses.
- Queries the Shopify Admin GraphQL API to fetch the customerβs tags and (for B2B) the purchasing company and location details that arenβt included in the order webhook.
- Evaluates the order against the wholesale rules (B2B company order and/or matching wholesale tags, plus the minimum order value) and generates a formatted HTML email with order details and a Shopify admin link.
- Sends the email alert via SMTP only when the order qualifies as wholesale/B2B.
Setup
- Create and install a Shopify app with
read_ordersandread_customersscopes, and connect it to n8n using a Shopify OAuth2 API credential. - Add an SMTP credential for sending mail and select it in the email-sending step.
- Update the Settings values (shop subdomain, wholesale tag, minimum order value, and to/from email addresses) before activating the workflow.
π Nodes Used
Send Email, HTTP Request, Shopify Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File