It's 11pm and a customer has just written "where is my order??" for the second time. The answer is sitting in your Shopify admin: shipped Tuesday, with the carrier, due Thursday, tracking link attached. Nobody on your team will send it until tomorrow morning. By then you've got a chargeback thread open and a one-star review half written.
This is the n8n workflow we build to answer that email in two minutes, written up the way you'd want it if you were paying for it. What it does. What each email costs you. Which replies the model is allowed to send on its own and which it isn't. And the actual template you can paste into your own n8n. It's the same shape as the pipeline that resolves 65% of a store's 5,000 monthly emails without a person, which you can read about in the CollageDepot case study. It uses only what you already have: a Gmail inbox, your Shopify store, Slack, and one API key.
What the workflow does, in one screen
Fifteen working nodes, six stages. Every stage writes what it found onto the email for you, so the reply is written from your order record and not from the customer's description of it.
That's the whole thing. If you've read our guide to ecommerce customer service automation, this is its six-stage pipeline built out for you as a template, with the decisions that guide could only describe. Multi-issue support email is one of five store jobs where an agent earns its place; our guide to AI agents for ecommerce covers the other four.
Why the order lookup is the whole game
Every template library has a "where is my order" auto-reply you can install in ten minutes. Most of them skip the part that makes it work for you. A reply written without the order record is a template, and "your order is on its way" is true of every order and useful to none. A reply written with the record says the parcel left the warehouse on Tuesday with a named carrier, is due Thursday, and here's the tracking link. That's a resolved ticket. Your customer doesn't reply, doesn't call, doesn't open a dispute.
Two things about the lookup are worth your attention, because they decide whether this runs for years or breaks next quarter.
First, the template talks to Shopify's GraphQL Admin API, not the REST one. Shopify declared the REST Admin API legacy on 1 October 2024, and since 1 April 2025 new public apps have to be built on GraphQL alone. The orders query takes a search string, so one call finds the order by name or by your customer's email: name:#1042 for a reference, or email:dana@example.com when there isn't one, most recent first. That's the whole integration: two plain HTTP Request nodes, one that gets a token from your Shopify app and one that asks the question, so it's yours to change.
Second, the workflow checks that the email address on the order matches the address that wrote to you. If it doesn't, nothing about the order goes to anyone. Your team gets the mismatch as the reason in Slack, and the customer's tracking link stays private. Gorgias, a Shopify help desk, puts "where is my order" at 18% of incoming requests on average, the single largest class you handle. Answering it from the record, and only to the person the record belongs to, is where most of your resolution rate comes from.
What one email costs to handle
Here's the arithmetic on a single support email, using the same $22 loaded hour we use across the agent cost article. Handling one email by hand means you read it, open the order in Shopify, check the carrier, write the reply and close the ticket. We take that as six minutes, the same figure the ecommerce guide uses. Substitute yours.
The model call isn't your bill, though. Your bill is people, and it depends on how many emails send, how many wait for a two-minute review, and how many someone handles from scratch. Here are three mixes on the same 5,000 emails, with a review costed at $0.73.
What the model decides, and what it doesn't
This is the part the template libraries skip, so we'll be precise about it for you, because it's what makes the workflow safe to leave running overnight.
The model gets the customer's email, the order record, your policy facts and your brand voice line. It returns exactly one thing to you: a JSON object that matches a schema you set. An intent from a fixed list, the language the customer wrote in, a confidence from 0 to 1, whether a person is needed and why, a one-line summary for your team, and the reply. The request uses the API's structured-output format, so the answer fits the schema or it isn't returned at all. No stray sentence breaks your next node at 2am.
Then the model's job ends. A few lines of your code decide the route. An intent sends only if it's on your allowed list, the confidence clears your bar, the model didn't ask for a person, and, for order questions, the order was found and the email matched. Everything else becomes a draft or an escalation. The reply that sends gets your disclosure line appended, the one from Settings, so an EU customer is told an automated system wrote it. Since 2 August 2026, Article 50 of the EU AI Act requires that, and it's a two-line setting rather than a project.
The same logic covers the model declining or failing. A refusal, a parse error, an intent that isn't on the list: the Code node doesn't guess. It routes the email to a person with the reason attached. Silent failure is the one thing your support inbox must never do, because an email that vanishes looks exactly like a quiet day.
The template, node by node
Fifteen working nodes plus four sticky notes with the setup instructions. You edit one node; the rest run as they are.
The model call is deliberately a plain HTTP Request node rather than a vendor node, and so is the Shopify lookup. They survive your n8n upgrades, because the HTTP node's shape hasn't changed in years while the AI nodes get rewritten every few months, and they're yours to point elsewhere. To use a different model you change a URL, two headers and a body, and keep the JSON schema so the routing code still works. To use WooCommerce, you change one query.
Get the template
Copy the JSON below, open a new workflow in your n8n, and paste it onto the canvas. n8n creates all nineteen nodes with the connections and the sticky notes. Then follow the yellow overview note. Edit Settings. In Shopify, go to Settings, then Apps, then Develop apps, and choose Build apps in Dev Dashboard; create an app with the read_orders scope, release it and install it on your store. In n8n, add a Custom Auth credential on Get a Shopify token whose JSON is {"body": {"client_id": "your client ID", "client_secret": "your secret"}}, from the app's settings. Add a Header Auth credential named x-api-key for the model node, select your Gmail and Slack credentials, and click Test workflow. The pinned sample email runs the whole thing end to end before a real customer writes to you.
We validate the file the way you'd want any template validated. Every node type, version and parameter is checked against the n8n package it will run in, and every connection against a node that exists. Every Code node runs, word for word, against 29 cases, including a poll that brings three emails at once. The Shopify query is checked against Shopify's published 2026-07 Admin API schema. Then the whole workflow ran inside n8n against stand-ins for Shopify, Anthropic, Gmail and Slack, with five emails in one poll: five lookups, five answers, two replies, one draft and two Slack notes, each matched to the right customer. That doesn't prove the workflow will answer your customers well. It proves it does what this page says, and the first fortnight of drafts proves the rest.
What to change for your store
You'll want to change four things, and the template is built so each is one edit.
Your policy facts live in Settings, not in the prompt. Your return window, your shipping promise and the sentence about your brand voice are three fields, and the model is told to answer from them and nothing else. When your Christmas cut-off changes, you change a field.
Your send list is a comma-separated field. It starts as order status and policy answers. When a fortnight of drafts shows the model gets damaged-item replies right, you add the class and it starts sending. Take one off just as easily when something changes.
The confidence bar is a number, 0.8 by default. Lower it and more sends; raise it and more waits. Watch your drafts folder for a week before you touch it.
The channel is Gmail because most small stores start there. If your mail lives in a help desk, the trigger becomes that help desk's webhook and the two Gmail actions become its reply and its internal note; the middle of the workflow doesn't change. Our ecommerce automation page covers the help-desk version and the four-language setup CollageDepot runs.
Where it goes wrong
The same rules hold for every agent we build for you. The handoff article is the longer version of why the draft-for-review tier exists and what your Slack message should contain.
What to require from whoever builds it
Whether that's us or anyone else, this is what you should see before a support pipeline goes live on your inbox.



