Quick overview
Answer Shopify support emails from the order record, not from guesswork. Claude drafts each reply from the Shopify order and your store policies; your code decides whether it sends, waits as a Gmail draft for review, or goes to Slack. The model never refunds, cancels or picks the route.
How it works
- Polls Gmail every minute for unread emails in the Inbox.
- Normalizes the sender, subject and message text (quoted replies stripped), finds an order reference like #1042 in the subject or body, and falls back to searching by the sender's email address when there isn't one.
- Gets a fresh 24-hour token from your Shopify app, then makes one GraphQL Admin API call for the order's status, fulfillment, carrier, tracking, delivery estimate, line items and the email on the order.
- Sends the email, the order record and your store facts to Claude (Anthropic Messages API) and gets back JSON that matches a fixed schema: intent, language, confidence, whether a person is needed, a one-line summary and the reply.
- A Code node applies your rules: the intent must be on your send list, clear the confidence bar and, for order questions, the email on the order must match the sender. Replies inside an existing thread and anything unclear go to a person.
- Send: Gmail replies in the thread with your disclosure line. Draft: Gmail saves a reply in the thread and Slack tells the team why it is waiting. Escalate: Slack gets the summary, the reason and the thread link. Spam ends at a node that does nothing.
Setup
- Select your Gmail credential on the trigger and on both Gmail nodes. The trigger reads unread mail in the inbox every minute; add a label filter if support shares the mailbox.
- In Shopify, create an app in the Dev Dashboard with the read_orders scope, release it and install it on your store. On Get a Shopify token, add a Custom Auth credential with the JSON {"body": {"client_id": "your client ID", "client_secret": "your secret"}}.
- Create an HTTP Header Auth credential named x-api-key with your Anthropic API key as the value, and attach it to Classify and draft with Claude.
- Select your Slack credential on Ask the team to review and Escalate to a person. The channel name comes from Settings.
- Edit Settings: store name, shop subdomain, return window, shipping promise, brand voice, the intents allowed to send, the confidence bar, signature and disclosure line. Then click Test workflow: a sample email is pinned, so you can run it end to end before a real customer writes in.
Requirements
- Gmail, Slack, an Anthropic API key and a Shopify app from the Dev Dashboard with the read_orders scope. Core nodes only (Gmail, HTTP Request, Code, Switch, Slack), so it runs on n8n Cloud or self-hosted.
Customization
- Add a class to the send list in Settings once a fortnight of drafts shows the model gets it right, and raise or lower the confidence bar (0.8 by default). To use another model, change the URL, headers and body of the Claude node and keep the JSON schema so the routing code still works. For WooCommerce, replace the two Shopify HTTP nodes with one order lookup. Refunds, credits, cancellations and address changes are always drafted for a person, never sent.
Additional info
Built by Amplence. The cost per email, the send-or-draft threshold and the reasoning behind each node are explained in the companion article: https://amplence.com/blog/n8n-shopify-customer-support-workflow