Send Payment Reminders and Cancel Unpaid Shopify Orders via Gmail
N8N Workflows

Send Payment Reminders and Cancel Unpaid Shopify Orders via Gmail

Automate unpaid Shopify order recovery. Send staged payment reminders via Gmail, automatically cancel expired orders, restock inventory, and receive daily CSV admin audit reports with n8n.

⏱️ SAVE HOURS

Download the n8n Workflow

Import the workflow used in this guide.

Download ↓

Why Unpaid Orders & Locked Inventory Hurt Shopify Stores

Shopify Pending Payment and Unpaid Order Management Dashboard

Every Shopify store merchant using offline payment methods—such as Wire Transfers, Bank Deposit, Cash on Delivery (COD), Purchase Orders, or Draft Invoices—encounters the headache of unpaid pending orders. When customers place an order without instant online payment, inventory is immediately reserved.

If those customers delay or abandon payment, your store faces serious operational drawbacks:

  • Locked Stock: High-demand items remain tied up in pending orders, preventing active paying customers from buying them.
  • Phantom Sales: Revenue figures appear inflated until unpaid orders are manually audited and canceled.
  • Manual Follow-Up Fatigue: Support and finance teams waste hours sending manual reminder emails and updating Shopify order tags.
  • Inconsistent Inventory Levels: Forgetting to cancel unpaid orders leads to stock discrepancies and missed sales opportunities.

How Automated Payment Reminders & Order Cancellation Solve the Bottleneck

Automated n8n Payment Reminders & Order Cancellation Workflow Diagram

This automated workflow is available as a free template on n8n. 👉 View & Download the Workflow Template on n8n

This n8n workflow automates the entire payment recovery and inventory restocking cycle. Running daily on a schedule, it scans open unpaid orders, delivers a multi-stage sequence of Gmail reminders, automatically cancels orders that exceed your store's deadline, restocks inventory, and emails an admin audit report with a CSV attachment.

How the Automated Workflow Works

Step 1 — Daily Scheduled Execution (8:00 AM)

The workflow triggers automatically every morning at 8:00 AM. It loads configurable store settings including your Shopify domain, reminder day thresholds (e.g., Day 2, Day 5, Day 7), cancellation window (e.g., Day 10), and admin email address.

Step 2 — Fetch Unpaid Orders via Shopify Admin GraphQL API

📖 Shopify Admin GraphQL API Documentation

The workflow queries Shopify’s GraphQL API for open orders with pending payment status created within your lookback period. It filters out invalid records and retains only orders that have a valid customer email address.

Step 3 — Evaluate Order Age & Tag History

For each order, the workflow calculates exact days elapsed since creation and evaluates existing Shopify order tags (e.g., reminder-1-sent, reminder-2-sent, reminder-3-sent) to prevent duplicate messaging.

Step 4 — Route Action: Remind, Cancel, or Skip

Based on the calculated order age and tags:

  • Stage 1 Reminder (e.g. Day 2): Sends a polite payment reminder via Gmail with payment instructions and tags the order reminder-1-sent.
  • Stage 2 Reminder (e.g. Day 5): Sends a follow-up warning email and tags the order reminder-2-sent.
  • Stage 3 Final Warning (e.g. Day 7): Sends a final payment request before cancellation and tags the order reminder-3-sent.
  • Order Cancellation (e.g. Day 10+): Cancels the order in Shopify via GraphQL with restock: true, sends a cancellation notice to the customer, and tags the order order-canceled-unpaid.

Step 5 — Automatic Inventory Restocking

When an unpaid order reaches the cancellation threshold, Shopify's GraphQL API executes a cancellation with restocking enabled. Reserved stock is immediately returned to your active inventory, making it available for paying customers without human intervention.

Step 6 — Daily Admin CSV Audit Report via Gmail

At the end of each run, the workflow compiles a detailed CSV report containing order IDs, customer names, email addresses, order age, action taken, and order total. The report and summary statistics are automatically emailed to your store admin via Gmail.

Step-by-Step Implementation Guide

Step 1: Setup Shopify Admin API Credentials

  1. In your Shopify Admin, create a Custom App or Private Access Token with read_orders, write_orders, and write_merchant_managed_fulfillment permissions.
  2. In n8n, create a Header Auth credential named Shopify Token.
  3. Set your shopifyDomain (e.g., your-store.myshopify.com) in the workflow configuration node.

Step 2: Connect Gmail OAuth2 Credentials

📖 Gmail API OAuth2 Setup Documentation

  1. In Google Cloud Console, enable the Gmail API and configure OAuth2 consent.
  2. In n8n, create a Gmail OAuth2 credential.
  3. Test email sending by triggering a test execution.

Step 3: Configure Thresholds & Store Policies

In the workflow configuration node, customize the following variables:

  • reminder1Days: Days after order creation for initial reminder (default: 2 days).
  • reminder2Days: Days for second reminder (default: 5 days).
  • reminder3Days: Days for final notice (default: 7 days).
  • cancelDays: Days after order creation to execute cancellation (default: 10 days).
  • adminEmail: Recipient email address for daily CSV audit reports.

Comparison: Manual Follow-Ups vs. Automated n8n Workflow

FeatureManual Follow-Up ProcessAutomated n8n Workflow
Execution FrequencyAd-hoc / When team has timeAutomated daily schedule (8:00 AM)
Reminder AccuracyInconsistent, easy to miss orders100% accurate multi-stage reminder flow
Duplicate ProtectionManual checking of email threadsShopify order tags track sent reminders
Order CancellationRequires manual order search in ShopifyAutomatic cancellation upon deadline
Inventory RestockingRisk of forgetting to restock itemsInstant GraphQL restock on cancellation
Admin ReportingNo structured trackingDaily CSV audit report attached via Gmail

Real-World Use Cases

Use Case 1: Bank Transfer & Wire Payment Stores

Stores accepting bank deposits often wait days for payments. Automated reminders guide customers through deposit instructions, while hard deadlines prevent inventory from being locked indefinitely.

Use Case 2: B2B & Wholesale Draft Invoices

Wholesale merchants sending draft orders to business clients can automate payment term follow-ups (Net 7 / Net 30) with professional staged reminders.

Use Case 3: High-Demand Limited Releases

For limited-edition product drops, holding unpaid inventory for weeks causes lost revenue. Setting aggressive cancellation thresholds (e.g. 48 hours) returns reserved stock to eager buyers immediately.

Troubleshooting & Best Practices

  • Email Bouncing: Ensure your Gmail account has sufficient sending quota and proper SPF/DKIM records set up.
  • Tag Collision: Do not manually remove reminder-X-sent tags from open orders unless you want the workflow to resend that specific reminder.
  • GraphQL Rate Limits: Keep fetchLimit at 100 per execution to stay well within Shopify API cost limits.

Conclusion

Managing unpaid Shopify orders manually wastes valuable support time and locks up inventory that could be sold to active buyers. By implementing this automated n8n workflow, your store gains consistent payment recovery reminders, automated order cancellations with inventory restocking, and full daily admin audit visibility.

Ready to streamline your unpaid order workflow? Download the Free n8n Workflow Template Today

so
← Back to all posts