We’ve built a Flow that emails customers when their invoice (NET terms) goes overdue. It works, but it’s messy. Because Flow doesn’t really “loop,” I had to stack a long chain of steps: wait 1 day → check if paid → if not, send reminder → repeat. Shopify also seems to cap how long a single flow can run (around 30 days), so this approach doesn’t scale.
I also tried using the Scheduled time trigger so it could run once a day and sweep for unpaid orders. The problem is that schedule-based flows don’t bring an order into context, so I can’t select order or payment schedule variables, and the Send payment reminder action needs a PaymentSchedule.
One more thing I’m trying to do: send a reminder 5 days before the due date. I can’t find a native way in Flow to “wait until due date minus 5 days” tied to paymentTerms.dueAt. Maybe I’m missing a trick, but I haven’t been able to make that work cleanly.
So my questions: is there a native Flow pattern to 1) keep sending daily reminders after the due date until the order is paid (beyond 30 days), and 2) send a T-5 reminder? If not, what workarounds have you used, like a webhook to an external scheduler, Mechanic/Klaviyo, or a “Scheduled time → Run code → For each order → Get order data → Send payment reminder” setup?
You can be creative and use several flows instead of a single one as you’d need to utilize multiple triggers.
Say, you start from “Payment schedule is due” and set an “overdue” tag on the order pulled from paymentTerms.
Another flow scheduled to run daily, get list of orders which has “overdue” tag, loop over them and send payment reminder (order has links to Payment schedules)
Benefit of scheduled flows is that it knows what time it is (other triggers do not), so you can compare scheduledAt with due date and that’s how you can have your T-5.
And then you’d need yet another flow to remove the “overdue” tag when the order is finally paid.
Unfortunately, yes, you can’t tell flow to wait till specified date/time.
You can have a scheduled Flow to “get order data”, but since you can’t get more than 100, you need to somehow limit the set of orders you want to work with.
I know these restrictions can be frustrating, but they have valid reasons – it is so easy to create an infinite loop or want to loop over all orders/products/customers in store when you actually need only a handful.
Good question, to be precise, no one “told” me there’s a hard global 30-day cap on all Shopify Flow runs. What I meant is that, in practice, Flow isn’t designed to loop indefinitely
Flow A: Payment schedule is due → if unpaid, tag the order overdue.
Flow B: Scheduled time (daily) → Run code to fetch up to 100 orders with the overdue tag that are still unpaid → For each → Get order data → For each payment schedule (unpaid) → Send payment reminder. I’ll add a guard tag like reminded-YYYY-MM-DD so we don’t email twice in one day.
Flow C: Order financial status changed (or schedule paid) → if paid, remove overdue and any reminder tags so the daily sweep ignores it.
Flow D (T-5): another Scheduled time flow → Run code to find NET-terms orders with dueAt in the next 5 days → send a single “due soon” reminder.
Got any suggestions on this approach?
We’ll run a daily Scheduled Flow that calls a Cloudflare Worker to page through all overdue, unpaid NET orders (no 100-item cap).
The Worker returns order IDs; Flow loops them: Get order data → check unpaid → Send payment reminder.
With scheduled flow you can schedule more and get 100, process them and tag “processed-today”, then run again and get same data, but “not processed-today” – this way you can kinda work around 100 limit.
Flow now supports liquid for “remove tag” actions, so you can remove tags which you “calculate” in flow, not predefined in action settings.
Do not see anything obviously wrong, but devil is in the details, so may need further fine-tuning, also I do not know your data.
Generally, when you need to “Get data”, you look at what query parameters you can use.
Say, for Flow D, you can’t directly query for NET-terms orders, but you can set a “NET-terms” tag when order is created, and later use this tag in Flow D.
Second approach – there are ways to work around the 100 limit, so not sure if really need a Worker here – it’s tempting, but probably not the most efficient due to needing to “get order data” for each ID instead of constructing a single’ish query which will return a bunch of orders. Or pass more data from the Worker?
If you don’t mind using third-party apps, the Flow Companion app can help you create a workflow that runs automation on a schedule for all orders matching a given query, without any limit on the number of orders in the selection.
Use Start custom workflow for list of orders action after the Scheduled time trigger, specifying the appropriate query in the Query field (for example NOT financial_status:paid), and entering any identifier you prefer in the Specifier field (for example: send_reminder).
Then, create a workflow with the reminder-sending logic that starts with the trigger Order: custom trigger triggered. This workflow will be started from the previous one for each order in the selection.
@vikaskheni You’re right — Flow isn’t ideal for looping reminders or handling date offsets like “5 days before due.” The 30-day runtime cap makes it tricky to scale.
A cleaner setup is to use Mechanic or a custom webhook script that runs daily. It can query unpaid payment schedules through the Shopify API, send reminders, and handle both “T-5” and post-due notifications without Flow’s limitations.
If you prefer staying inside Shopify, use Flow only as a daily trigger that calls your external logic via webhook — that keeps things simple and reliable.