Build an AI Agent That Answers Every Stock Question For You
You can build an AI agent that answers stock questions, takes orders, and tracks them by connecting a chat trigger to an AI model in a tool like n8n, pointing it at your existing stock sheet, and having it log every order and confirmation automatically. A single builder wired the whole thing in one sitting using n8n, OpenAI, Google Sheets, and Gmail, no code required.
Somebody is messaging your shop right now asking if you have something in stock. You will see it in four hours. They will not wait four hours.
It is 11 a.m. On a Tuesday. Femi runs a small phone and electronics shop off Computer Village in Lagos, three staff, one back room stacked with boxes. A message lands on the shop's WhatsApp Business number: "Hi, you have the 32 inch Samsung TV? How much, and can I pick up today?"
Femi is on the shop floor. His phone is in a drawer, charging. The message sits there. So does the next one, and the one after that.
Two hours later he checks his phone. Fourteen messages. Six are the same question in six different phrasings: is this in stock. Two are people who already bought from someone else. He replies to the rest, checks the shelf himself for three of them because the box that says "32 in stock" on paper does not match what is actually there, and loses twenty minutes he did not have.
This is not a Femi problem. It is every shop that sells things people ask about before they buy: electronics, hardware, spare parts, furniture, pharmacies, clothing racks with sizes that run out first. The question is always some version of "do you have this," and the answer always lives in your head, or a notebook, or a spreadsheet nobody else can see.
Here is what actually happens right now
Walk through a normal day for a shop like Femi's:
- A customer messages on WhatsApp, Instagram, or your website chat widget asking about stock.
- You, or whoever is free, stops what they are doing to check.
- You reply, sometimes minutes later, sometimes hours later.
- If they want to order, you write it down somewhere: a notebook, a sticky note, a chat you will scroll back through later.
- Nobody sends a confirmation. Nobody logs it anywhere searchable. If the customer messages back next week asking "where is my order," you are hunting through old chats.
None of this is a skills problem. Femi is good at running a shop. The problem is that the shop's stock list lives in his head and a spreadsheet, and the only way a customer can query either one is by messaging a human and waiting.
You are the inventory system. That is the actual bottleneck, and it is fixable without hiring anyone.
A chatbot answers questions. An agent finishes the job
Most small businesses that have tried "AI" for this have tried a chatbot: a canned reply that says "thanks for your message, someone will get back to you." That is not automation. It is a slightly nicer away message.
An agent is different because it does four things a chatbot cannot: it reads the actual intent behind the message (is this a stock question, an order, or a tracking request), it checks a real source of truth (your stock sheet, not a guess), it takes the action that intent calls for (answers, places the order, or looks up the status), and it closes the loop by logging the result and sending a confirmation, without anyone touching a keyboard.
That difference, checking a real number and finishing the transaction instead of just replying, is the whole game.
The build that made this concrete
A tutorial published this week by the automation channel Triff Tech Solution walks through this exact build, start to finish, in one sitting, aimed at retail shops and the freelancers who build for them. No custom software. Four tools, wired together in a workflow tool called n8n:
The build has five moving parts, and each one maps directly onto a step a customer's message goes through:
- A chat trigger catches the incoming message. In the tutorial this is a chat window; in your shop it would sit behind WhatsApp Business, Instagram DMs, or a website widget, so customers message the way they already message you.
- An AI classification step reads the message and sorts it. Is this a product inquiry, a new order, or someone asking about an order they already placed? The model reads plain language, not keywords, so "you still have the 32 inch Samsung" and "is the TV available" both land in the same bucket.
- A product inquiry agent checks your actual stock sheet and answers. No guessing, no "let me check and get back to you." It reads the same Google Sheet you already keep stock counts in and replies with what is really there.
- An order placement agent generates an order ID and logs the sale. A short script node stamps a unique ID on the order the moment it is placed, then writes the customer, the item, and the ID into the same sheet, auto-mapped to your existing columns.
- Gmail sends two confirmations automatically. One to the customer, confirming what they ordered and their order ID. One to you or your distributor, so someone always knows a sale just happened, even if no human was watching the phone.

A sixth piece handles tracking: a customer sends their order ID back later, the agent looks it up in the same sheet, and returns the status, no notebook, no scrolling through old chats.
Isn't this just a fancier chatbot?
Fair question, and worth answering directly. A chatbot has a script. It can say "we're open 9 to 6" or "thanks, someone will reply soon." It cannot tell you if the 32 inch Samsung is actually on the shelf, because it is not looking at your shelf, or your sheet, or anything real.
The agent described above is not smarter conversation. It is a worker with read and write access to the one document your stock actually lives in. It answers because it looked, and it logs because it acted. That is the difference between a greeting and a transaction. It is the same shift we walked through when we built a support agent for the easy 80 percent of customer tickets: the agent does not need to be clever, it needs to actually finish the task.
Chatbot vs. Agent: what changes
| Task | Chatbot | Inventory agent |
|---|---|---|
| "Do you have this in stock?" | "Someone will reply soon" | Checks the sheet, answers with the real count |
| Placing an order | Not possible | Generates an order ID, logs it, confirms by email |
| "Where's my order?" | Not possible | Looks up the order ID, returns status |
| Record of the conversation | Buried in chat history | Every inquiry and order logged in one sheet |
| Owner notified of a sale | No | Automatic email the moment it happens |
How Femi's message plays out with the agent running
Same message, same Tuesday. "You have the 32 inch Samsung TV? How much, can I pick up today?" lands on the shop's WhatsApp number.
The agent reads it, classifies it as a product inquiry, checks the stock sheet, and replies within seconds: yes, in stock, price, pickup hours. The customer says "I'll take it." The agent classifies the follow-up as an order, generates order ID SM-2031, writes the sale into the sheet next to the stock count, and fires two emails: one to the customer with the order ID and pickup details, one to Femi confirming a Samsung 32 inch just sold.
Femi finds out about the sale from his inbox, not from a customer standing at the counter asking why nobody replied. If the customer messages three days later asking about their order, they send SM-2031 and get an answer instantly, because the agent is looking at the same sheet it wrote to.
Nothing about Femi's actual stock system changed. He still counts boxes the same way. The only thing that changed is who answers the door when a customer knocks, and that door is now open at 2 a.m. As easily as 2 p.m.
What you would need to build this yourself
The tutorial uses four pieces, all of which have a free or cheap starting tier:
- A workflow tool like n8n (self-hostable, or a low-cost cloud plan) to hold the logic and connect everything.
- A language model like OpenAI's GPT models to classify messages and write replies. Cost scales with usage, typically a few dollars a month for a small shop's message volume.
- A stock sheet you already have, or a fresh Google Sheet, as the single source of truth the agent reads and writes.
- Email (Gmail or any provider with an API) to send confirmations to customers and notify the owner.
None of it requires writing software. The one piece of code in the whole build is a short script that generates a unique order ID, and the tutorial hands that over ready to paste in.
What you have after this
A week in, the workflow exists: a chat trigger, a classifier, three small agents, one sheet, two email confirmations. It is rough. Test it on your own number before customers touch it.
A month in, you have connected it to the channel customers actually use, WhatsApp, Instagram, or your website, and fixed the phrasing that confused it the first few times a real customer asked something oddly worded.
Six months in, this is not a project anymore. It is the way stock questions get answered at your shop, and if you are the freelancer or agency owner who built it, it is also a service you now know how to sell to the next five shop owners on your street who are still checking shelves by hand.
Same shop, same stock, same shelves. A completely different front door.
Do I need to know how to code to build an AI inventory agent?
No. The build described here uses a visual workflow tool (n8n) where you connect pre-built nodes: a chat trigger, an AI model, a spreadsheet, and email. The only code involved is a short, ready-made script that generates a unique order ID, and you can copy it in rather than write it yourself.
What tools do I need to build this?
Four things: a workflow automation tool like n8n, a language model such as OpenAI's GPT for reading messages and classifying intent, a spreadsheet (Google Sheets works fine) as your stock source of truth, and an email account to send confirmations. All four have free or low-cost starting tiers.
How much does it cost to run once it's built?
The workflow tool and spreadsheet can run on free tiers for a small shop's volume. The main ongoing cost is the AI model, billed by usage, which for a small shop's daily message volume typically runs a few dollars a month. Treat this as an estimate and check current pricing before you commit.
Will this replace my existing inventory system or POS?
No, and it shouldn't try to. The agent reads and writes to the stock sheet or system you already use. It is a front door that answers customers automatically using your real numbers, not a replacement for how you track stock.
What happens if a customer asks something the agent can't handle?
Build in a fallback from day one: if the classifier can't confidently sort a message, route it to a human, you, instead of guessing. That keeps trust intact while the agent handles the repetitive stock and order questions that eat your day.
Find your first high-payback workflow.
See the SprintSources
Find your first high-payback workflow.
Book a free conversation or start with the fixed-fee Sprint.
Keep reading
Build an AI Agent That Treats a One-Star Review Differently Than a Five-Star One
To build an AI agent that responds to customer reviews automatically, do not build one path for every review. Build a graph: a rule that reads each review,…
Front-office AIBuild an AI Support Agent That Knows When to Say No
Build a governed AI support agent by wrapping your model in three layers: a policy check that blocks unapproved actions before the AI answers, a guardrail…
AI agentsStop Your AI From Guessing: Get Grilled Before You Build
Before you let an AI agent build or automate anything, make it interview you first. This week the habit went viral under the name "grilling," after…