Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Agentic AI Without Coding Class #32: Preparing Google Sheets for Stock, Prices, and Orders as a Data Source”.
Other ways we can help with Agentic AI.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

MATLAB Agentic AI Course: Building Autonomous AI Agents with MATLAB & Simulink

Midjourney Course: Create Stunning AI Images from Text
★ 4.9

DALL-E Course: Creating Professional AI Images from Text
★ 4.9
Have it built for you
No time to learn Agentic AI? Our team can do the project for you.

MATLAB & Simulink Development — Agentic AI for Simulation Automation and Data Analysis

AI Image Creation with Stable Diffusion — Unlimited Custom Visual Production
★ 4.9

AI Image & Video Creation with Leonardo AI — All-in-One Visuals for Business
★ 4.9
Get notified about new Agentic AI classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Welcome back to Session 7. In the last episode our agent learned to think and use a tool, but it still knows nothing about Sunset Coffee. Today we prepare its data source: one Google Sheets file with a Products tab and an Orders tab, laid out neatly so the agent can read it easily, and then we test the connection from n8n.
Let's start with a test. We ask the agent from the last episode: how much is the gift hamper? The agent answers confidently: one hundred twenty-five thousand rupiah, including lovely packaging. The problem is, that number is made up. The real price of a Sunset Coffee hamper is one hundred fifty thousand. A careful customer objects right away, because Instagram shows a different price. The agent apologizes, but the customer's trust has already taken a hit. Imagine if the customer had transferred money at the wrong price. This is why an agent must have a data source. Now look at a real problem at Sunset Coffee. At nine forty-seven at night, Rina asks whether the one-liter iced coffee is still available, for an office event tomorrow at noon. Dimas has already gone home, so the message only gets a reply the next morning. And even then, Dimas has to walk to the kitchen to check the stock first. Eight minutes later the answer is finally certain: there are still twelve in stock. But Rina already ordered somewhere else last night. If the agent could read the same stock data as Dimas, a question like this could be answered correctly in seconds, even after hours. The principle is simple: an agent is only as good as the data it can read. An AI model is great at writing sentences, but it doesn't know your shop's prices and stock today. The solution is one tidy Google Sheets file as the source of truth. Prices, stock, and orders are recorded in just one place, and the agent is required to read from there. If the data in Sheets is wrong, the agent's answers are wrong too. So today's work looks simple, but it's actually the most important foundation of the whole admin agent we build in Session 7. Here's how the work is split at Sunset Coffee. Dimas, the shop admin, updates the stock every morning and whenever a product sells out. All that data is stored in one Google Sheets file, with two tabs: Products and Orders. The agent reads the Products tab to answer prices and stock, then logs new orders to the Orders tab. Dimas then processes the orders whose status is still New. People and the agent see the same data, so answers to customers always match what's really in the kitchen. Why Google Sheets, and not a special database? Because Laras and Dimas already use it, it's free, it opens on a phone, and it connects easily to both n8n and Make.
Open Google Sheets and create a new file named Sunset Coffee, Store Data. Rename the first tab to Products, then add a second tab named Orders. In the first row of the Products tab, write four headers: Product name, Price, Stock, and Variants. The agent will read these headers as column names, so choose clear words that don't keep changing. The second row is the first product: palm sugar iced coffee, two hundred fifty milliliter cup, price eighteen thousand, stock forty, variants regular and less sugar. The third row: one-liter palm sugar iced coffee, price eighty-five thousand, stock twelve. A customer orders this product in Episode 35. The fourth row: five hundred milliliter cold brew, price fifty-five thousand. Notice the stock is zero. We set it to zero on purpose, to test how the agent handles a sold-out item. The fifth row: the gift hamper, price one hundred fifty thousand, stock six, with two variants: regular and sugar-free. One important thing about the price column. Type only the number, for example eighty-five thousand with no dots and no Rp, then choose the Rupiah currency format from the format menu. It looks neat, but the content is still a number. The Products tab is done: four rows, four columns, no decorations. Simple, and that's exactly what makes it easy for the agent to read. Let's make the content rules clear. First, prices are plain numbers in Rupiah format. Don't type eighty-five k, or Rp with a dash by hand, because the agent may misread it. Second, stock is a whole number, and zero means sold out. Avoid words like sold out, a few left, or about twelve. The agent needs an exact number to decide whether it can accept an order. Third, product names are written the same way as on the menu and Instagram. Customers usually use names from there, and the agent matches them to this column. Fourth, variants are separated by commas in one cell. If your variants have different prices, put them in separate rows, for example a sugar-free hamper as its own product. Fifth, new products are added in the bottom row. If a product is paused for a while, just set its stock to zero. Don't delete the row, because older orders still mention that product name.
Switch to the Orders tab. Here every row is one order. We need seven headers. The first three: the Time the order is logged, the customer's Name, and the WhatsApp number so Dimas can contact them. The next four: the Product ordered, the Quantity, the Total to be paid, and the order Status. The agent will fill in these seven columns every time a customer orders. As an example, Dimas has already logged two orders by hand. Budi ordered one cold brew. The total is sixty-five thousand: fifty-five thousand plus the ten thousand delivery fee within the city. Sari ordered two gift hampers. The total is three hundred thousand, with no delivery fee, because orders above two hundred thousand get free delivery. We will also write this delivery rule into the agent's instructions later. Look at the WhatsApp number column. This is the customer's personal data. In the video we mask it, but in the real file the number is complete. That's why this file must never be shared with a public link. This is what a row added by the agent will look like. Andi ordered three iced coffee cups. The total is sixty-four thousand: fifty-four thousand plus delivery. The status is New, waiting for Dimas to check it. New rows are always added below the last row, and never overwrite old ones. That's why you should never leave an empty row in the middle of the Orders tab. The Status column needs firm rules. New means the order was logged by the agent and not yet checked by the admin. This is the only status the agent may set. Dimas sets Processing after confirming the payment and delivery address directly with the customer. Shipped means the order is being delivered by a courier or by the Sunset Coffee team. Done means the customer has received the order. From this status, Laras can easily calculate weekly sales later. And Canceled, when the customer cancels or the stock turns out to be short. This split keeps the agent to logging only, while important decisions stay in human hands.
Compare this with the kind of table we often see in small businesses. The first header holds the title SUNSET COFFEE DATA, not a column name. The price is written together with the product name, and the stock says about twelve left. Then there's an empty row. To a person it's just spacing, but to a data-reading tool, an empty row can be treated as the end of the table. The products below it don't get read. The cold brew stock says sold out, and the hampers with two variants are crammed into one cell. The agent has to guess what they mean. Finally, there's a TOTAL row at the bottom. The agent might treat TOTAL as a product name with a stock of eighteen. It sounds funny, but mistakes like this really happen. From that example, we draw six rules. First, one row per record. One product per row, one order per row. Second, the first row holds clear, unique headers. Don't have two columns with the same name, and don't put a big title above the headers. Third, no merged cells and no empty rows. Merged cells may look nice, but they confuse data-reading tools. Fourth, one type of content per column. The price column holds numbers, the stock column holds numbers, with no words mixed in. Fifth, no total rows, titles, or notes inside the table. If you need a summary or a chart, make it in a separate tab. Sixth, once the file is connected to n8n, don't rename tabs and headers carelessly. The agent's tools look for columns by name, so a small change can make logging fail. These six rules also apply to your own business data, whatever your products are. A table that's tidy for an agent is usually easier for your coworkers to read too. Let's look at the results side by side. The messy header was a big title. After tidying, the header holds four clear column names. The price that was stuck to the product name now has its own column, holding a number in Rupiah format. The stock that was written in words is now an exact number: twelve, or zero when sold out. And the variants that were crammed in with the price now have their own column. This tidying might take half an hour, but it saves a lot of wrong answers later on.
Now let's make sure n8n can read this file. Build a separate small test workflow. The first node is a Manual Trigger, which runs every time we click the test button. Add a Google Sheets node, then create a new credential. Choose to sign in with Google, and approve access to Google Sheets. Use the same account that owns the file. You can revoke this access at any time from your Google account settings. Choose the Get Row(s) operation, which means fetching rows. For the document, choose Sunset Coffee Store Data from the list, then choose the Products sheet. We leave the filter field empty, so all rows are read. The product table is small, so it's safer for the agent to see everything and pick out the product being asked about on its own. Click test. Both nodes get a green check mark, and the output panel shows four items. One item for each product row. Notice the prices are read as numbers, and the cold brew stock reads zero. The table headers become the column names in every item. This is the sign our table is tidy. If the number of items doesn't match the number of products, or an item is empty, the cause is usually an empty row or a duplicate header. Tidy the table, then test again. Make users can run the same test with the Google Sheets module that searches rows. Save this small test workflow. Whenever the table structure changes, run it once to make sure the data is still read correctly, before the agent gets confused in front of a customer. Because this file is now connected to an automation, pay attention to who can access it. Share it only with the people who truly need it: Laras as the owner, Dimas as the admin, and the Google account that n8n uses. Don't use the anyone with the link option. The WhatsApp number column holds customers' personal data, which must be protected. Use the version history in Google Sheets. If data is deleted or changed by accident, the previous version can be restored in a few clicks. And set the limits from the start: the agent may only read the Products tab and add rows to the Orders tab. Changing prices or deleting data stays a human job.
Data that is tidy today can be outdated tomorrow. That's why Sunset Coffee sets a routine. Every morning before the shop opens at eight, Dimas updates the stock column. When a product sells out in the middle of the day, its stock is set to zero right away. Don't wait until tomorrow, because the agent will keep offering a product that's no longer there. Only Laras, as the owner, changes prices, and then Dimas is told. That way, no two people change a price to different numbers. And several times a day, Dimas checks the Orders tab for orders with the status New. The agent logs them, and Dimas makes sure they actually get processed. This two-tab pattern works for many businesses. Mr. Hendra at Cerdas Tutoring, a tutoring center, can make a Classes tab with the schedule, fees, and remaining seats, plus a Registrations tab to log new students. Dewi at Maju Bersama Co. can use an Items tab with prices and warehouse stock, plus a Requests tab to log quote requests from client offices. Nadia, the social media freelancer, just needs a Service Packages tab and a Leads tab. The general formula: one tab for the agent to read, and one tab for the agent to log to. Try deciding right now what those two tabs would hold for your business or job. Let's check today's work. First, the store data file is created with two tabs: Products and Orders. Second, the Products tab has four columns, with prices and stock as numbers, not words. Third, the Orders tab has seven columns, from time to status, and customers' WhatsApp numbers are not shared publicly. Fourth, both tables are tidy: no merged cells, no empty rows, and no total rows in the middle. And the Get Row(s) test from n8n reads every product. If everything is checked, your data is ready for the agent.
Let's recap. An agent is only as good as the data it can read. We prepared a Products tab for prices and stock and an Orders tab for logging orders, followed six rules for a tidy table, and tested the connection. In the next episode we turn this data into tools the agent uses on its own: a tool to check products, a tool to log orders, and a tool to send notifications to Dimas. See you in Episode 33.
Try these on your own after watching to lock in what you learned.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →