TL;DR: This guide shows you how to build a Shopify AI customer support chatbot with n8n that answers shopper questions around the clock. An AI Agent node reads live order status from the Shopify Admin API, pulls answers from your own FAQ in Google Sheets, and emails you a clean handoff when a human is needed. You connect your credentials, paste one embed snippet into your theme, and your store has a 24/7 first responder. Build time is about 40 minutes.
Prefer to skip the setup? Grab the ready-made template → and have it running in under 10 minutes.
What it does
A shopper opens the chat bubble on your store and types “Where is my order?” or “What’s your return window?”. Instead of waiting hours for an email reply, they get an instant, accurate answer.
Here is the experience end to end:
- The customer types a question into a chat widget embedded on your Shopify storefront.
- The AI Agent reads the message and decides which tool it needs.
- For an order question, it asks for the checkout email, then queries the Shopify Admin API and reports the live fulfillment status.
- For a policy question, it reads your FAQ sheet and answers in your store’s voice.
- If it genuinely cannot help, it emails you the full conversation and tells the shopper a human will follow up.
The agent remembers the conversation, so a shopper can ask a follow-up like “and when will that ship?” without repeating their email. That memory is what separates a real support agent from a canned FAQ bot.
Why it beats the default
Shopify’s built-in options and most chat apps fall into two camps. The free ones are dumb autoresponders that only match keywords to canned replies, so “where is order 1043” gets the same generic answer as everything else. The smart ones are paid SaaS tools that charge per seat or per resolved conversation, and your data lives on their servers.
This workflow gives you the smart behaviour without the lock-in:
- It reads live order data, so “where is my order” returns the actual fulfillment status and tracking, not a link to a help page.
- Your FAQ lives in a Google Sheet you control, so updating an answer takes seconds and no developer.
- There are no per-seat or per-conversation fees. You pay cents per chat for the model and nothing else.
- Everything runs in your own n8n instance, so the conversation and customer data stay with you.
For a deeper look at how these pieces fit together across a store, see our pillar guide on n8n Shopify automation.
What you need
- An n8n instance, Cloud or self-hosted, on a version that includes the AI Agent and Chat Trigger nodes (1.x current).
- A Shopify Admin API access token with
read_ordersscope (created from a custom app in your Shopify admin). - An OpenAI API key. You can swap in Claude or Gemini if you prefer.
- A Google account with a Sheet holding your FAQ and policy answers.
- A Gmail account for the human-handoff emails.
Estimated build time: about 40 minutes from scratch, or under 10 minutes with the ready-made template.
How it works — the big picture
┌──────────────────────────────────────────────────────────────┐ │ SHOPIFY AI CUSTOMER SUPPORT CHATBOT │ │ │ │ [Chat Trigger] ──► [AI Agent] ──► reply to shopper │ │ (store widget) │ │ │ ├─ ai_languageModel ─ [OpenAI gpt-4o-mini] │ │ ├─ ai_memory ──────── [Simple Memory] │ │ ├─ ai_tool ────────── [Order Status (HTTP)] │ │ ├─ ai_tool ────────── [Store FAQ (Sheets)] │ │ └─ ai_tool ────────── [Escalate (Gmail)] │ └──────────────────────────────────────────────────────────────┘
The Chat Trigger is the only entry point. Everything else hangs off the AI Agent as a sub-node: the model that does the thinking, the memory that holds the conversation, and three tools the agent calls when it needs them.
Node-by-node list
| Node | Type | Role |
|---|---|---|
| Chat Trigger | @n8n/n8n-nodes-langchain.chatTrigger | Embeddable storefront chat widget; entry point |
| AI Agent | @n8n/n8n-nodes-langchain.agent | Reads the message, chooses tools, writes the reply |
| OpenAI Chat Model | @n8n/n8n-nodes-langchain.lmChatOpenAi | The reasoning model (gpt-4o-mini) |
| Simple Memory | @n8n/n8n-nodes-langchain.memoryBufferWindow | Keeps the conversation context per session |
| Order Status | @n8n/n8n-nodes-langchain.toolHttpRequest | GET request to the Shopify Admin API for order data |
| Store FAQ | n8n-nodes-base.googleSheets (as tool) | Reads your policy and FAQ rows |
| Escalate to human | n8n-nodes-base.gmail (as tool) | Emails you the conversation when the agent is stuck |
The Chat Trigger connects to the AI Agent on the normal main output. The other five nodes connect into the agent’s sub-inputs: one into ai_languageModel, one into ai_memory, and three into ai_tool. There are no Set or IF nodes to misconfigure, which removes the most common import failures.
Step-by-step build
1 Add the Chat Trigger
Create a new workflow and add a Chat Trigger node. In its settings, set the mode to Hosted Chat (publicly available). n8n will generate a chat URL and an embed snippet you will paste into your theme later. Leave authentication off for now while you test; you can add basic auth before going live.
Tip: Set an initial greeting in the Chat Trigger options, for example “Hi! Ask me about your order, shipping, or returns.” It sets expectations and nudges shoppers toward questions the agent can actually answer.
2 Add the AI Agent
Add an AI Agent node and connect the Chat Trigger’s main output into it. Open the agent and set the system message. This prompt is the personality and the rulebook:
You are the support assistant for [Store Name].
Be friendly, concise, and never invent facts.
- For order questions, ask for the email used at checkout, then use
the Order Status tool. Only share details for that exact email.
- For policy, shipping, or returns questions, use the Store FAQ tool.
- If you cannot answer confidently, use the Escalate tool to email
the team, then tell the customer a human will reply by email.
Never reveal another customer's information.
3 Attach the OpenAI Chat Model
Add an OpenAI Chat Model node and connect it to the agent’s ai_languageModel input (the small port under the agent). Select your OpenAI credential and set the model to gpt-4o-mini. It is cheap, fast, and more than capable for support triage.
To use Claude or Gemini instead, swap this one node for the Anthropic or Google Gemini chat model node. Nothing else in the workflow changes.
4 Attach Simple Memory
Add a Simple Memory node and connect it to the agent’s ai_memory input. Set the session key to ={{ $json.sessionId }} so each shopper gets their own thread, and a context window of around 10 messages. This is what lets a shopper ask “and when will it ship?” without repeating their email.
5 Add the Order Status tool
Add an HTTP Request Tool and connect it to an ai_tool input. Name it order_status and describe it as “Look up a Shopify order by customer email”. Configure a GET request:
Method: GET
URL: https://YOUR-STORE.myshopify.com/admin/api/2024-10/orders.json
Query: email = {email} (let the model fill this)
status = any
Auth: Header Auth -> X-Shopify-Access-Token: YOUR_TOKEN
Mark the email query value as set by the model, so the agent fills it from what the shopper provided. A successful call returns order data the agent reads back in plain language:
{
"orders": [
{
"name": "#1043",
"email": "james.carter@gmail.com",
"financial_status": "paid",
"fulfillment_status": "fulfilled",
"fulfillments": [
{ "tracking_company": "USPS", "tracking_number": "9400110200..." }
]
}
]
}
Tip: Keep the API version current (here 2024-10). Shopify retires old versions yearly, and a stale version is the number-one reason an order lookup silently returns nothing.
6 Add the Store FAQ tool
Add a Google Sheets node, set the operation to Get Rows, and connect it to a second ai_tool input. Point it at a sheet with two columns, topic and answer. Name the tool store_faq and describe it as “Read store policies, shipping times, and returns”. The agent will scan the rows and answer in your voice.
7 Add the Escalate-to-human tool
Add a Gmail node, set the operation to Send, and connect it to a third ai_tool input. Name it escalate_to_human. Set the recipient to your support inbox and let the model fill the subject and body with the customer’s email and the question it could not resolve. Email keeps a clean, searchable record of every gap in your FAQ.
Escalation by email means nothing depends on you watching a live chat. You reply on your own schedule, and the shopper already knows a human is coming.
8 Embed and test
Save and activate the workflow. Copy the embed snippet from the Chat Trigger and paste it just before the closing </body> tag in your theme.liquid (Online Store -> Themes -> Edit code). Reload your storefront, open the chat bubble, and ask “Where is order #1043?” using a real test email.
Common mistakes
- Wrong tool port. The model, memory, and tools connect to the small sub-inputs under the AI Agent, not to its main input. Dropping a tool onto the main flow is the most common reason an imported agent does nothing.
- Missing Shopify scope. If order lookups return empty, your access token probably lacks
read_orders. Recreate the custom app with the right scope and refresh the token. - Stale API version. A retired Shopify API version returns a 404 or empty array with no obvious error. Keep the version string current.
- No session key on memory. Without
={{ $json.sessionId }}as the key, every shopper shares one memory and the agent gets confused across conversations. - Vague tool descriptions. The agent picks tools by their description. “Look up a Shopify order by customer email” works; “orders” does not.
Cost at realistic volume
The only per-message cost is the model. Running gpt-4o-mini, a four-turn support conversation with memory uses roughly 8,000 input tokens and 1,000 output tokens in total.
| Volume | Approx. tokens/month | OpenAI cost |
|---|---|---|
| 100 chats | 0.8M in / 0.1M out | ~$0.18 |
| 1,000 chats | 8M in / 1M out | ~$1.80 |
| 5,000 chats | 40M in / 5M out | ~$9.00 |
Add your existing n8n plan and the Google and Gmail tools, which are free at this scale. Compared with paid support-chat SaaS that bills per seat or per resolved conversation, you are paying single-digit dollars to deflect thousands of tickets.
🚀 Get the Shopify AI Customer Support Chatbot template
Skip the wiring. The ready-to-import template comes with the validated workflow JSON, a setup guide, and a credentials walkthrough so you connect your keys and go live in minutes. Want it installed and tuned for your store instead? See our done-for-you services.
Get it set up for me →Instant download · Works on n8n Cloud and self-hosted
FAQ
Do I need to know how to code to build this Shopify AI customer support chatbot?
No. Every part is a node you configure with dropdowns and text fields. The only things resembling code are the Shopify API URL and the agent system prompt, and both are copy-paste. You connect your credentials, paste one embed snippet into your theme, and the chatbot is live on your store.
Will the chatbot share private order data with the wrong customer?
It only returns an order after the shopper supplies the email used at checkout, and the lookup filters on that exact email. The system prompt forbids revealing another customer’s data. For stricter control, add an order-number check on top of the email match before any details are read back.
How much does it cost to run an AI support chatbot on Shopify?
The model is the only per-message cost. With gpt-4o-mini, a typical four-turn chat costs a fraction of a cent. At a thousand conversations a month you are looking at roughly two dollars in OpenAI usage plus your existing n8n plan. There are no per-seat or per-conversation SaaS fees.
Can I use Claude or Gemini instead of OpenAI?
Yes. The AI Agent node accepts any chat model, so you can swap the OpenAI Chat Model for an Anthropic Claude or Google Gemini model without touching the rest of the workflow. The tools, memory, and escalation logic stay identical. Pick whichever model fits your budget and tone.
What happens when the chatbot cannot answer a question?
The agent calls the Gmail escalation tool, which emails you the full conversation and the shopper’s contact details. It then tells the customer a human will follow up by email. Nothing is dropped, and you build a running list of every question your FAQ does not yet cover.
Related guides
Prefer to skip the build? The Shopify AI Customer Support Agent is this workflow ready to import, with a setup guide.