This guide builds a Shopify failed payment recovery email in n8n that watches for orders stuck on payment pending, waits a couple of hours, then emails the customer a friendly nudge to finish paying. It uses a Schedule Trigger, the Shopify Admin API, a Gmail send, and an order tag so nobody gets chased twice. You can have it live in about 35 minutes, and it quietly claws back revenue that would otherwise just sit there unpaid.
Prefer to skip the setup? Grab the ready-made template and be running in under 10 minutes.
What it does
Not every Shopify order gets paid the moment it is placed. If your store accepts bank transfers, cash on delivery, manual payment methods, or you invoice bigger customers through draft orders, those orders land in your admin marked Payment pending. The customer meant to pay, then got distracted, and now that order is just sitting there. Multiply it across a month and it adds up to real money you already earned but never collected.
This workflow runs on a timer. Every hour it asks Shopify for open orders that are still pending, keeps only the ones that have been waiting a sensible amount of time, and sends each customer a short reminder email with a link back to their order so they can complete payment. Once an order has been contacted, the workflow tags it inside Shopify so the next run skips it. No spreadsheets to babysit, no double emails, no manual chasing.
It sits naturally alongside the rest of an automated store. If you are building out a stack of these, the n8n Shopify automation hub collects the related order and customer workflows in one place.
Why it beats the default
Shopify will happily show you a pending order in the admin, but it will not chase the customer for you. Out of the box your only options are to manually scan the Orders page and email people one at a time, or to ignore the problem and write the money off. Neither scales past a handful of orders a week.
Paid recovery apps from the Shopify App Store solve it, but they charge a monthly fee or a slice of every order they recover, and they lock the logic inside their dashboard. With n8n you own the workflow end to end. You decide how long to wait, what the email says, and when to stop. There is no per-order cut and no extra subscription, because the same n8n instance can run all of your store automations together.
The tagging step is the part most homegrown attempts miss. Because the reminder writes a tag straight back to the order, the system has a memory. That single detail is what turns a script that spams customers every hour into a tool that contacts each person exactly once.
What you need
- An n8n instance, either n8n Cloud or self-hosted, on version 1.0 or newer.
- A Shopify store with admin API access, so n8n can read orders and write tags.
- A Gmail account connected to n8n for sending the reminder. Outlook or SMTP work just as well.
- At least one payment method that produces pending orders, such as bank deposit, cash on delivery, or draft order invoices.
Build time is roughly 35 minutes from scratch, or under 10 minutes if you import the template and drop in your credentials.
How it works, the big picture
SHOPIFY FAILED PAYMENT RECOVERY EMAIL
[Schedule Trigger] hourly
|
v
[HTTP Request] -- GET pending orders from Shopify
|
v
[Split Out] -- one item per order
|
v
[Filter] -- 2 to 48h old, has email, not yet tagged
|
v
[Gmail] -- send "finish your payment" reminder
|
v
[HTTP Request] -- PUT tag "payment-reminder-sent" on the order
Node-by-node list
Six nodes, in a single straight line. Nothing branches, which keeps it easy to reason about.
| # | Node | Type | Job |
|---|---|---|---|
| 1 | Every Hour | Schedule Trigger | Starts the run once an hour |
| 2 | Get Pending Orders | HTTP Request (Shopify Admin API) | Pulls open, pending orders |
| 3 | Split Orders | Split Out | Turns the orders array into one item each |
| 4 | Stalled And Not Contacted | Filter | Keeps only orders worth emailing |
| 5 | Send Reminder | Gmail | Emails the customer a payment nudge |
| 6 | Tag As Reminded | HTTP Request (Shopify Admin API) | Marks the order so it is skipped next time |
Step-by-step build
1. Add the Schedule Trigger
Create a new workflow and drop in a Schedule Trigger node. Set it to a fixed interval of every 1 hour. This is the only trigger in the workflow, and it sits at the very start so the run always begins on the timer, never in the middle of the flow.
2. Get pending orders from Shopify
Add an HTTP Request node wired to the trigger. Configure it like this:
- Method:
GET - URL:
https://YOUR-STORE.myshopify.com/admin/api/2026-04/orders.json - Authentication: Header Auth, with header
X-Shopify-Access-Tokenset to your admin API token. - Send Query Parameters: on. Add
status=open,financial_status=pending,limit=250, andfields=id,name,email,created_at,order_status_url,tags,total_price,currency.
The response hands back an object with an orders array. A single order looks roughly like this:
{
"id": 5123456789012,
"name": "#1042",
"email": "james.carter@gmail.com",
"created_at": "2026-06-27T13:10:42-04:00",
"order_status_url": "https://your-store.myshopify.com/.../orders/abc123",
"tags": "",
"total_price": "129.00",
"currency": "USD"
}
Asking Shopify for only the fields you need with the fields parameter keeps each response small and your runs fast, especially on stores with a long order history.
3. Split the orders into single items
Add a Split Out node. Set the field to split out to orders. n8n now emits one item per order, so every node after this point works on a single order at a time instead of one big array.
4. Filter down to orders worth emailing
Add a Filter node with three conditions, all of which must be true. This is where you avoid both nagging people too early and chasing dead orders forever.
- Older than 2 hours:
{{ $now.diff($json.created_at, 'hours') >= 2 }}istrue. - Younger than 48 hours:
{{ $now.diff($json.created_at, 'hours') <= 48 }}istrue. - Has an email and is not already tagged:
{{ $json.email && !$json.tags.includes('payment-reminder-sent') }}istrue.
Orders that fail any check drop out silently, which is exactly what you want.
5. Send the reminder with Gmail
Add a Gmail node set to send a message. Map the fields to the current order:
- To:
{{ $json.email }} - Subject:
Your order {{ $json.name }} is almost done - Message: a short, warm note. For example: Hi, we are holding order {{ $json.name }} for you but have not received payment yet. You can review it and finish up here: {{ $json.order_status_url }}. Reply to this email if anything went wrong and we will sort it out.
Keep the tone helpful, not pushy. This customer already wanted to buy. A single clear link and a reply-to offer converts far better than a stern payment demand.
6. Tag the order so it is only emailed once
Add a final HTTP Request node to write the tag back to Shopify:
- Method:
PUT - URL:
https://YOUR-STORE.myshopify.com/admin/api/2026-04/orders/{{ $json.id }}.json - Authentication: the same Shopify Header Auth credential.
- Body: set Send Body on, Body Content Type to JSON, then provide the JSON body below.
{
"order": {
"id": {{ $json.id }},
"tags": "{{ $json.tags }}, payment-reminder-sent"
}
}
Because Shopify replaces the whole tag string on update, you pass the existing tags plus the new one. Next hour, the Filter sees payment-reminder-sent and skips the order. Save the workflow and switch it on.
Common mistakes
- Expecting it to catch Shopify Payments card declines. A declined card usually means no order exists, so there is nothing to find. For that case, an abandoned checkout sequence is the right tool. Browse the Shopify automation guides for that flavor.
- Forgetting the time floor. Without the 2 hour minimum, you email people who are literally still on the bank transfer screen. Give them room to finish on their own first.
- Skipping the tag step. If you do not write a tag back, the hourly schedule will email the same customer every single hour until they pay or you intervene. The tag is the memory that prevents this.
- Overwriting tags by accident. Always include
{{ $json.tags }}in the PUT body so you append rather than wipe any tags the order already had. - Setting the limit too low. Use
limit=250so a busy store does not leave pending orders unprocessed at the bottom of the list.
Cost at realistic volume
Say your store takes 60 pending orders a month and roughly a third of them stall long enough to need a nudge, so about 20 reminder emails go out monthly. Here is what that actually costs to run.
| Piece | Volume | Cost |
|---|---|---|
| n8n (self-hosted) | ~720 runs/month | $0, your own server |
| Shopify Admin API calls | ~1,440 calls/month | $0, within rate limits |
| Gmail sends | ~20 emails/month | $0, inside daily limits |
Even on n8n Cloud, those 720 executions a month sit comfortably inside the entry plan. If recovering even three or four stalled orders a month covers the entire stack, and it usually does several times over, the workflow pays for itself immediately.
Ready-to-import template
Get the Shopify Failed Payment Recovery template
The guide above is free to follow. If you would rather skip the build, download the ready-to-import workflow, then just add your credentials. Prefer it installed and tuned for you? See our done-for-you services.
Instant download · Works on n8n Cloud and self-hosted
FAQ
Does this work with Shopify Payments card declines?
Not directly. A declined card on Shopify Payments usually means no order is created, so there is nothing to recover here. This workflow targets orders that exist but sit on payment pending, which is what you get with bank transfer, cash on delivery, manual payment methods, and draft order invoices.
Will a customer get emailed more than once?
No. After the reminder sends, the workflow tags the order payment-reminder-sent through the Shopify API, and the Filter node skips any order that already carries that tag. Each pending order receives exactly one nudge, even though the schedule runs every hour.
How often should the schedule run?
Once an hour is a good default. The Filter only acts on orders between 2 and 48 hours old, so the customer gets a little breathing room before the first reminder and you stop chasing orders that are clearly never going to convert.
Can I send the reminder from Outlook or SMTP instead of Gmail?
Yes. Swap the Gmail node for the Microsoft Outlook node or the Send Email (SMTP) node. The fields that matter, recipient address and message body, map across one to one, so the rest of the workflow stays exactly the same.
Do I need a paid n8n plan?
No. Every node here ships with n8n core or the free Shopify and Gmail integrations, and it runs fine on a self-hosted instance or n8n Cloud. Your only real cost is the email sending, which Gmail covers inside its normal daily limits.
Related guides
- The n8n Shopify automation hub, every order and customer workflow in one place.
- All Shopify automation guides, including abandoned checkout and win-back email flows.
- Done-for-you setup, if you would rather have the workflow installed and tuned for your store.