Skip to main content

Send payment reminders and cancel unpaid Shopify orders via Gmail

Workflow preview

Workflow preview
100%
Send payment reminders and cancel unpaid Shopify orders via Gmail preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow runs daily to find open, unpaid Shopify orders, send staged payment reminder emails via Gmail, and automatically cancel long unpaid orders while restocking inventory. I...

Best for

  • Invoice Processing automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.errortrigger, n8n-nodes-base.gmail, n8n-nodes-base.set, n8n-nodes-base.scheduletrigger, n8n-nodes-base.graphql, n8n-nodes-base.splitout, n8n-nodes-base.filter

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Tricore Infotech Pvt Ltd.

Original n8n.io source

1.1 Workflow description

Title
Send payment reminders and cancel unpaid Shopify orders via Gmail
Workflow name
Send payment reminders and cancel unpaid Shopify orders via Gmail

Quick overview

This workflow runs daily to find open, unpaid Shopify orders, send staged payment reminder emails via Gmail, and automatically cancel long-unpaid orders while restocking inventory. It also emails an admin a daily CSV audit report and sends error alerts if the workflow fails.

How it works

  1. Runs every day at 8:00 AM and loads your Shopify domain, reminder thresholds, cancellation window, and admin email settings.
  2. Queries Shopify’s Admin GraphQL API for open orders with pending payment created within the configured lookback period, then keeps only orders that have a customer email address.
  3. Calculates how many days each order has been pending and checks existing Shopify order tags to decide whether to send Reminder 1/2/3, cancel the order, or take no action.
  4. Generates an HTML email (subject and body) for the selected action and routes each order to the reminder, cancellation, or skip path.
  5. Sends reminder emails through Gmail and then adds a corresponding Shopify order tag (for example, reminder-2-sent) to avoid sending the same reminder again.
  6. Cancels eligible orders through Shopify GraphQL with restocking enabled, sends a cancellation email via Gmail when the cancellation succeeds, and otherwise skips further customer actions.
  7. Builds a CSV log and summary statistics for all evaluated orders and emails the report (with CSV attachment) to the configured admin address via Gmail.

Setup

  1. Create a Shopify Admin API access token with permissions to read orders and edit orders/tags (and to cancel orders), and add it as an HTTP Header Auth credential named Shopify Token.
  2. Connect a Gmail account using OAuth2 credentials named Gmail OAuth2 so the workflow can send customer emails, admin reports, and error notifications.
  3. In the workflow configuration, set your shopifyDomain, adminEmail, reminder day thresholds, cancellation day threshold, lookback window, and fetch limit to match your store policies.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Template Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Section: Trigger

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Section: GraphQL Ingestion

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Section: Matrix Calculation

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Section: Email Preparation & Routing

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Section: Admin Report

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Section: Customer Outbound

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Section: Error Handling

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - On Global Error

Type / Role
n8n-nodes-base.errorTrigger - errorTrigger
Config choices
Version 1

Block 10 - Send Error Notification

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 11 - Set Workflow Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - Daily Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 13 - Fetch Unpaid Shopify Orders

Type / Role
n8n-nodes-base.graphql - graphql
Config choices
Version 1.1

Block 14 - Split Orders from GraphQL Response

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 15 - Filter Orders with Valid Email

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.3

Block 16 - Process Orders in Batches

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 17 - Calculate Days & Determine Action

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Build Email Templates

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Route by Action Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.4

Block 20 - Cancel Order in Shopify

Type / Role
n8n-nodes-base.graphql - graphql
Config choices
Version 1.1

Block 21 - Cancel Succeeded?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 22 - Send Cancellation Email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 23 - Add Reminder Tag to Order

Type / Role
n8n-nodes-base.graphql - graphql
Config choices
Version 1.1

Block 24 - Send Reminder Email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Showing the first 24 of 30 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Send payment reminders and cancel unpaid Shopify orders via Gmail
Complexity advanced
Nodes 30
Categories Invoice Processing
Author Tricore Infotech Pvt Ltd
Published 03 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16084/16084.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Send payment reminders and cancel unpaid Shopify orders via Gmail do?

Quick overview This workflow runs daily to find open, unpaid Shopify orders, send staged payment reminder emails via Gmail, and automatically cancel long unpaid orders while restocking inventory. I...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing use case.