Running an online store means dealing with endless support tickets. The same questions pop up every day—”Where’s my order?” “Can I return this?” “What’s your refund policy?”
I got tired of it. So I built an AI chatbot using N8N (a self-hosted automation platform) that now handles almost everything. It answers routine questions instantly and sends complex issues straight to my team with all the details they need.

Here’s exactly how I built it, step by step.
Step 1: Getting the Chat Widget on Your Website
First, you need to connect your website to the automated system.
The Node: Chat Trigger

This is where everything starts. Open your N8N platform and add the Chat Trigger node. Set it to “make chat publicly available” and choose “embedded chat” mode so it shows up on your site.
Adding It to Your Store
If you’re running WooCommerce or WordPress, copy the CDN embed code from N8N. Then paste it into your theme’s footer.php file, right before the closing footer tag. Replace the placeholder in the script with your Chat URL (the webhook URL from N8N). Now the chat widget appears on your store.
Step 2: Building the AI Brain
Once the chat is live, you need to tell the AI what to do.
The Node: AI Agent

This is powered by OpenAI and handles all the conversations. Set the prompt source to “define below” and write out your system instructions. Tell it to greet customers, ask for their name, email, and phone number, and then find out what they need.
The Node: Simple Memory

This node remembers what happened earlier in the conversation. It stores customer details like their name, email (say, h76@gmail.com), and phone number so the bot doesn’t ask the same questions twice. It uses the session ID to keep track of everything.
Step 3: Answering Common Questions
Most customer questions are predictable, so the bot checks its knowledge base first.
The Node: FAQ Data Tool (Google Docs)
This is where you store all your standard answers. Connect your N8N workflow to Google Docs using a client ID and secret. Set the operation to “Get” since you’re reading information from the doc. Drop in your Google Doc ID, and the bot can now pull answers about returns, refunds, and shipping policies.
For example, if someone asks about returning a 10-day-old t-shirt, the bot checks the FAQ and explains that returns usually only work within 7 days.
https://docs.google.com/document/d/1qNBwpiEGohZhCoXWm3ahg3wJdB_sWmptOJ6cDUBQgSE/edit?tab=t.0#heading=h.nkifmk92u88
Step 4: Calling in the Humans
When questions get too specific or complicated, the bot knows to get help.
The Node: Email Trigger (Gmail)

If someone asks, “Will my t-shirt color fade after washing?” or “Where’s my order?” with an order ID, the bot can’t handle it alone. So it triggers an email to your support team.
Connect the Gmail API and set the operation to “Send”. Add your support email as the recipient. The smart part? The system automatically grabs the customer’s name, email, phone number, and their full question, then includes all of it in the email. Your team gets everything they need to jump in and help.
Step 5: Saving Every Conversation
You don’t want to lose any customer data, so everything gets logged.
The Node: Store Data (Google Sheets)

Connect the Google Sheets API and set the operation to “Append Row”. Every time a chat ends, the workflow adds a new row to your spreadsheet with the session ID, date, customer name, email, phone number, and a summary of the conversation. The AI figures out what to save automatically based on the chat history.
This gives you a complete record of every customer interaction, which is gold for follow-ups and marketing.
Why This Setup Works
This workflow gives customers instant answers for routine stuff while making sure complex issues get passed to a human with full context. Nothing falls through the cracks, response times drop from hours to seconds, and your team can focus on problems that actually need their attention.
N8N makes it possible to build this kind of system yourself without hiring a dev team. It’s self-hosted, connects to all your tools, and gives you complete control over how your chatbot behaves.
If you’re running an ecommerce store and drowning in support tickets, this is how you fix it.
