Skip to main content
Lifetime license included with every purchase
n8n workflowsecommerce automationabandoned cartorder processing

How to Automate Your E-commerce Operations with n8n (Orders, Inventory, and Abandoned Carts)

Automate Shopify order processing, low-stock alerts, abandoned cart recovery, and post-purchase sequences with n8n. Step-by-step workflow breakdowns with real node logic.

Nn8n Marketplace Team·May 1, 2026·10 min read

Most E-commerce Operations Don't Need a Human

Order confirmations, low-stock alerts, abandoned cart emails, shipping updates, review requests — none of these require a human decision. They require a trigger, some data, and an action.

The problem is that most store owners either rely on expensive platform add-ons for each of these tasks or do them manually. Neither scales.

n8n connects directly to Shopify, WooCommerce, and your inventory systems. You build the logic once, and it runs automatically — without per-automation fees or monthly SaaS costs per workflow.

What You Can Automate

Every repetitive touchpoint in the e-commerce lifecycle is automatable:

  • Order confirmation and routing — send branded confirmations and route orders by value, SKU, or fulfillment location
  • Abandoned cart recovery — detect incomplete checkouts after 60 minutes and trigger a multi-touch recovery sequence
  • Low-inventory alerts — monitor stock levels and notify the buying team when any SKU drops below threshold
  • Shipping notifications — pull tracking data from your 3PL and push status updates to customers via email or SMS
  • Post-purchase review requests — fire 5 and 14 days after delivery to collect reviews on the right channels
  • Return and refund processing — log return requests, update inventory, and notify the warehouse team automatically
  • Daily sales digest — summarize orders, revenue, and fulfillment status and post to Slack before standup

The E-commerce Automation Pipeline

A complete n8n e-commerce setup runs three parallel tracks:

Track 1 — Order Processing:
Shopify Webhook (order/created) → Code (classify by value + SKU) → Switch
  → High-value: Slack alert + Gmail confirmation + Sheets log
  → Standard: Gmail confirmation + Sheets log
  → Digital product: Gmail (download link) + Sheets log

Track 2 — Abandoned Cart Recovery:
Shopify Webhook (checkouts/create) → Sheets (store cart) → Schedule (hourly)
  → Sheets (read carts >60 min old) → HTTP Request (check Shopify orders)
  → IF (no matching order) → Gmail (recovery email 1)
  → Wait (24 hours) → IF (still no order) → Gmail (recovery email 2 + discount)

Track 3 — Inventory Monitoring:
Schedule Trigger (daily 8am) → HTTP Request (inventory API) → Code (aggregate by SKU)
  → IF (qty < reorder_threshold) → Slack alert + Sheets log
  → IF (qty == 0) → Slack (urgent) + Gmail to supplier + Sheets log

All three tracks log to the same Google Sheets workbook — one source of truth for orders, carts, and stock.

1. Collect — Shopify Webhook Triggers

Set up a Webhook node in n8n and register it in your Shopify admin under Settings → Notifications → Webhooks. Subscribe to orders/created and checkouts/create.

When an order fires, Shopify sends a full JSON payload. A Code node immediately extracts and normalizes the fields you care about:

const order = $json;
return [{
  json: {
    order_id: order.id,
    customer_email: order.email,
    customer_name: order.billing_address?.first_name,
    total: parseFloat(order.total_price),
    item_count: order.line_items.length,
    fulfillment_status: order.fulfillment_status,
    financial_status: order.financial_status,
    skus: order.line_items.map(i => i.sku).join(','),
    created_at: order.created_at,
  }
}];

You now have a clean record ready for routing.

Use Shopify's REST API for backfills

Webhooks only fire on new events. To backfill historical orders or run a one-time audit, use an HTTP Request node calling GET /admin/api/2024-01/orders.json?status=any&limit=250. Paginate using the Link header until no next cursor is returned.

2. Process — Classify Orders by Value and Type

A Code node adds classification flags based on business logic before routing:

const order = $json;
const isHighValue = order.total > 150;
const isDigital = order.skus.includes('DIGITAL');
const needsAlert = isHighValue || order.item_count > 5;

return [{
  json: {
    ...order,
    order_tier: isHighValue ? 'high' : 'standard',
    is_digital: isDigital,
    needs_alert: needsAlert,
  }
}];

This happens in one node, before any branching — so each downstream branch receives clean, pre-classified data instead of running the same logic in multiple places.

Tag digital products consistently

n8n can't infer whether a product is digital from the Shopify payload alone. Use a consistent SKU prefix (e.g., DIGITAL-) or a Shopify product tag. The Code node can then check for that pattern without a separate API call to look up product metadata.

3. Route — Branch by Order Tier

A Switch node splits the classified orders into parallel branches:

High-value orders (total > $150):

  • Slack node posts to #orders-high-value with customer name, total, and item list
  • Gmail node sends a personalized confirmation referencing the specific items ordered
  • Google Sheets logs the order with a high tier flag

Standard orders:

  • Gmail node sends a standard order confirmation
  • Google Sheets logs the order

Digital products:

  • Gmail node sends delivery email with the download link from your storage URL
  • Google Sheets logs the order with digital flag
Get the Order Processing Automation template

4. Act — Abandoned Cart Recovery

The abandoned cart track needs a storage layer because Shopify's checkout webhooks don't tell you whether a checkout eventually converted — you have to check.

When checkouts/create fires:

  1. Google Sheets node appends a row: checkout_id, customer_email, cart_value, created_at, recovered: false

An hourly Schedule Trigger runs the recovery check:

  1. Google Sheets reads all rows where recovered == false and created_at is more than 60 minutes ago
  2. HTTP Request calls GET /admin/api/2024-01/orders.json?email={{email}} for each cart
  3. IF node checks: did an order arrive after the checkout timestamp?
    • Yes → update the Sheets row: recovered: true, skip_follow_up: true
    • No → send the first recovery email
// Recovery email content logic
const cartValue = parseFloat($json.cart_value);
const subject = cartValue > 100
  ? `You left $${cartValue} behind — here's 10% off`
  : `You left something in your cart`;

return [{ json: { ...$json, subject, discount: cartValue > 100 } }];

High-value abandoned carts ($100+) get a discount code. Lower-value carts get a plain reminder. A Wait node fires the second email 24 hours later — but only after another Shopify order check to avoid emailing someone who converted in the meantime.

5. Follow Up — Post-Purchase Sequences

The highest-leverage touchpoint most stores neglect is the post-purchase window.

A Schedule Trigger runs daily. A Google Sheets node reads the orders log. A Code node filters for:

  • Orders where days_since_order == 5 and review_requested == false → first review request
  • Orders where days_since_order == 14 and review_requested_2 == false → second review request (different platform)
const today = new Date();
const orders = items.map(i => i.json);

return orders.filter(o => {
  const orderDate = new Date(o.created_at);
  const daysSince = Math.floor((today - orderDate) / 86400000);
  return (daysSince === 5 && o.review_requested !== 'true')
    || (daysSince === 14 && o.review_requested_2 !== 'true');
}).map(o => ({ json: o }));

A Gmail node sends the review request. A Google Sheets node updates the row so the same customer never receives the request twice.

Get the User Feedback Loop template

Implementation Patterns

Pattern 1: Low-Inventory Slack Alert

The simplest high-value automation for any product business:

Schedule Trigger (daily 8am) → HTTP Request (inventory platform API)
  → Code (normalize SKUs and quantities)
  → IF (qty < reorder_threshold)
    → Slack (#buying-team): "SKU XYZ: 3 units left — reorder point is 10"
    → Google Sheets: log alert with timestamp
  → IF (qty == 0)
    → Slack (#buying-team, urgent): "SKU XYZ OUT OF STOCK"
    → Gmail: alert to supplier with SKU + typical order quantity

Your buying team gets a morning briefing on stock health without opening any dashboard. The supplier email fires only on stockouts — so it's a meaningful signal, not noise.

Pattern 2: Tiered Order Notification System

Not every order deserves the same attention. This pattern routes by value so the team focuses on what matters:

Shopify Webhook (order/created) → Code (classify)
  → IF (total > 500)
    → Slack (#founder): personal notification with customer name and items
    → CRM HTTP Request: create deal
  → IF (total 150–500)
    → Slack (#orders-high-value): team alert
  → IF (total < 150)
    → Google Sheets: log only (no alert)

The founder sees only the whale orders. The team sees high-value. Standard orders just go to the log. Zero inbox noise from the $12 purchase.

Pattern 3: Delivery-Triggered Review Request

Instead of timing review requests from the order date, trigger from the actual delivery confirmation:

Schedule Trigger (hourly) → HTTP Request (3PL or shipping API)
  → Code (find delivered shipments in last hour)
  → Google Sheets (mark as delivered, set review_date = today + 5)
  → Schedule Trigger (daily) → Sheets (read review_date == today)
  → Gmail (review request with product name and image link)

Reviews sent 5 days after delivery — when the customer has actually used the product — convert at significantly higher rates than reviews sent 5 days after purchase. The extra step of pulling delivery status from your 3PL is what makes this work.

Connect fulfillment data to your feedback loop

Once you have delivery timestamps, you can also route dissatisfied customers differently. Add an IF node after the review request: if the customer clicks the low-rating option, route them to a support ticket instead of a public review platform. This keeps your public reviews healthy while still capturing the feedback. See our guide to n8n customer feedback automation for the full pattern.

n8n Nodes You'll Use Most

NodePurpose
WebhookReceive Shopify order and checkout events in real time
Schedule TriggerRun inventory checks, cart recovery scans, and review requests on a schedule
HTTP RequestCall Shopify REST API, 3PL shipping APIs, and inventory platforms
CodeClassify orders, compute days-since-order, normalize inventory data
SwitchRoute orders by value tier, product type, or fulfillment status
IFFilter abandoned carts that haven't converted, check stockout thresholds
WaitIntroduce delays between abandoned cart recovery emails
GmailSend order confirmations, cart recovery, review requests, supplier alerts
SlackAlert team on high-value orders, stockouts, and daily sales digest
Google SheetsLog all orders and carts, track review request status, maintain inventory alerts
MergeCombine Shopify order data with shipping or CRM records

Getting Started

Pick the single highest-impact flow for your store and build only that piece first.

  1. Set up a Shopify webhook — in Shopify admin go to Settings → Notifications → Webhooks, add orders/created pointing to your n8n webhook URL
  2. Test with a real order — place a $1 test order and confirm the full Shopify payload arrives at your n8n webhook node
  3. Add a Code node to extract order_id, email, total, and line_items from the raw payload
  4. Wire a Gmail node to send a plain-text order confirmation — just the basics: order number, items, total
  5. Add a Google Sheets node to log every order — this gives you the data layer for all future automation
  6. Build one additional branch — once the core order log works, add abandoned cart detection or inventory alerts as a second workflow
  7. Schedule the recovery check — set your hourly Schedule Trigger for cart recovery only after you've confirmed the Sheets log is capturing checkouts cleanly

The order confirmation + Sheets log gets running in an afternoon. The abandoned cart system typically takes one more session. After that, the review request sequence is a straightforward add-on to the existing log.

For a broader look at how these workflows connect to your marketing stack, see our guide to n8n marketing automation workflows.

Browse e-commerce automation templates
FAQ

Common questions

Can n8n connect directly to Shopify?
Yes. n8n has a native Shopify node that handles orders, customers, products, and webhooks. You can also use the HTTP Request node to call Shopify's REST or GraphQL API directly for more granular control over response fields.
How does n8n handle abandoned cart recovery without a third-party email tool?
A Shopify webhook fires when a checkout is created. n8n stores the cart in Google Sheets, then a Schedule Trigger runs every hour to find checkouts older than 60 minutes with no corresponding order. A Gmail or HTTP Request node sends the recovery email from that filtered list.
Can n8n monitor inventory levels across multiple warehouses?
Yes. Use a Schedule Trigger with HTTP Request nodes calling each warehouse's API or inventory platform. A Code node aggregates totals per SKU, and an IF node fires Slack or email alerts when any SKU drops below your reorder threshold.
Stop reading. Start running.

Get the workflow templates this guide is built on

Import-ready n8n JSON, step-by-step setup, and tested end-to-end. One-time payment, own it forever.