Google Sheets + Gmail: low stock alerts, logged
Running out of a best-seller usually isn’t a “big mistake.” It’s a tiny miss that happens five times: nobody checked the supplier page, the sheet wasn’t updated, and the reorder email went out too late.
If you’re a store operator or procurement lead, you already know the routine. And agency teams managing e-commerce clients feel it too. This stock alert automation keeps a live log in Google Sheets and pings you in Gmail when inventory dips below your threshold.
You’ll see how the workflow watches supplier pages on a schedule, uses AI to interpret messy stock messages, then updates your sheet and alerts you only when it matters.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Google Sheets + Gmail: low stock alerts, logged
flowchart LR
subgraph sg0["Check Stock Every X Hours Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Check Stock Every X Hours", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Define Product URL", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "Scrape Product Data (via Age..", pos: "b", h: 48 }
n3@{ icon: "mdi:brain", form: "rounded", label: "OpenAI (Chat)", pos: "b", h: 48 }
n4@{ icon: "mdi:cog", form: "rounded", label: "Bright Data MCP (Scraper)", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Product In Stock?", pos: "b", h: 48 }
n6@{ icon: "mdi:message-outline", form: "rounded", label: "Email Supplier (Out of Stock..", pos: "b", h: 48 }
n7@{ icon: "mdi:cog", form: "rounded", label: "Do Nothing (Stock Available)", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Auto-fixing Output Parser", pos: "b", h: 48 }
n9@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n10@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n3 -.-> n2
n9 -.-> n8
n5 --> n7
n5 --> n6
n1 --> n2
n10 -.-> n8
n8 -.-> n2
n4 -.-> n2
n0 --> n1
n2 --> n5
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n2,n8,n10 ai
class n3,n9 aiModel
class n5 decision
Why This Matters: You Can’t Reorder What You Don’t Notice
Inventory problems rarely start in your warehouse. They start on supplier sites, in distributor portals, or in scattered emails that never make it into your tracking sheet. Someone “meant to check,” but it’s Friday, orders are flying in, and the only signal you get is when customers hit an out-of-stock page. Then comes the scramble: emergency reorders, apologetic support replies, and a sudden hit to your ad performance because the product you were pushing can’t ship. Honestly, it’s exhausting, and it’s preventable.
It adds up fast. Here’s where the friction usually shows up.
- Supplier pages change wording all the time (“limited,” “backorder,” “ships in 2 weeks”), so manual checks become guesswork.
- Google Sheets updates happen after the fact, which means the “source of truth” is always a little stale.
- When you’re tracking more than a handful of SKUs, daily checks can quietly eat about an hour.
- Miss one critical dip and you lose sales for days, plus you create a messy reorder trail that’s hard to audit later.
What You’ll Build: Automated Stock Checks with Sheet Logging + Gmail Alerts
This workflow runs scheduled stock checks, pulls product availability from supplier sources, and logs each result into Google Sheets so your inventory history stays clean. It starts with a scheduled trigger, then sets the item link (the product URL you want to monitor). Next, it uses Bright Data to scrape the page reliably (even when sites try to block bots). An AI agent then parses whatever the site is showing, turning messy text into structured stock information you can actually use. Finally, an If condition checks your threshold logic: if inventory is low (or “not available”), you get a Gmail alert; if it’s fine, the workflow does nothing and moves on quietly.
The workflow begins on a schedule, so you’re not relying on someone to remember. Bright Data collects the raw availability signals, OpenAI helps normalize them, and Google Sheets becomes your running log. Gmail only fires when the low-stock condition is met, so your inbox doesn’t turn into noise.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you track 20 products across 3 suppliers. If you manually check each supplier page and update a sheet, that’s maybe 3 minutes per product, plus another minute to log it. You’re at about 80 minutes every time you do a “full sweep.” With this workflow, the only hands-on part is maintaining your product URLs and threshold rules, which is closer to 10 minutes a week. The checks and logging run in the background, and Gmail only interrupts you when a SKU needs attention.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for inventory logging and history.
- Gmail to deliver low-stock alerts to your team.
- Bright Data credentials (get them from your Bright Data dashboard).
- OpenAI API key (get it from the OpenAI API keys page).
Skill level: Intermediate. You’ll connect accounts, add credentials, and map a few fields into your Sheet.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A scheduled check kicks it off. The workflow runs on a timetable you choose (for many shops, a couple times per day is plenty). This means you stop relying on “someone will check after lunch.”
Product links are set before scraping. The workflow loads the URL(s) for the items you care about, so the rest of the steps can treat each product the same way. If you later add suppliers or SKUs, you’ll extend the same pattern instead of reinventing anything.
Bright Data collects the raw stock signal. Instead of scraping directly from your server (which often gets blocked), Bright Data fetches the product page and returns the content reliably. Then the AI agent uses OpenAI to interpret what it sees and turns it into structured output, even if the page wording changes.
Low stock triggers Gmail, and the log stays in Sheets. An “availability check” decides if the result crosses your threshold. If it does, Gmail sends a supplier stock alert; if not, the workflow quietly does nothing. Either way, you still end up with clean tracking data in Google Sheets.
You can easily modify the threshold logic to match your reorder points, or swap the alert destination (for example, Gmail to a shared inbox vs. a specific buyer). See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the workflow to run on a daily schedule so the product status is checked automatically.
- Add the Scheduled Stock Check node as your trigger.
- Set the schedule rule to run at
triggerAtHour: 9so the check happens daily at 9 AM. - Confirm the trigger outputs to Set Item Link as shown in the execution flow.
Step 2: Connect the Product URL Input
Define the Amazon product URL that will be scraped on each schedule run.
- Open Set Item Link and add an assignment named Product url with the value
https://www.amazon.com/UGREEN-Delivery-Multiport-Adapter-Thinkpad/dp/B0BR3M8XHK/ref=sxin_14_recs_zoco_stores_brand_identity_bs?content-id=amzn1.sym.7d2e00dd-9358-4f89-aca0-04685eb73811%3Aamzn1.sym.7d2e00dd-9358-4f89-aca0-04685eb73811&crid=2CB2GLCEIKPKS&cv_ct_cx=ugreen&keywords=ugreen&pd_rd_i=B0BR3M8XHK&pd_rd_r=15617e04-710c-4101-b1d1-d8a58739f635&pd_rd_w=IUheb&pd_rd_wg=1rYBe&pf_rd_p=7d2e00dd-9358-4f89-aca0-04685eb73811&pf_rd_r=GKRJJFTMCPGTHRJZ980Z&qid=1751608771&sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&sprefix=ugre%2Caps%2C1277&sr=1-2-5f457e4f-4cf5-45bd-948b-58563dcb013a. - Verify Set Item Link connects to Agent Scrape Product Info.
Step 3: Set Up AI Scraping and Parsing
Configure the agent to scrape the product page using the BrightData tool and structure the results.
- Open Agent Scrape Product Info and set the Text to
=below is the amazon product and you will scrape the page and tell whether it is still in stock or out of stock: {{ $json['Product url'] }}. - Ensure OpenAI Chat Assistant is connected as the language model for Agent Scrape Product Info. Credential Required: Connect your
openAiApicredentials. - Confirm BrightData MCP Scraper is connected as an AI tool for Agent Scrape Product Info. Credential Required: Connect your
mcpClientApicredentials. - Verify Structured Result Parser is attached to Auto-Correct Output Parser with the schema in jsonSchemaExample for consistent output.
- Ensure OpenAI Model Selector is connected as the language model for Auto-Correct Output Parser. Credential Required: Connect your
openAiApicredentials.
Step 4: Configure Stock Logic and Notifications
Route the parsed availability status and send alerts when the product is out of stock.
- In Stock Availability Check, set the condition to compare leftValue
={{ $json.output.availability }}with rightValueIn Stockusing the equals operator. - Ensure the “true” output goes to No Action When In Stock.
- Configure Send Supplier Stock Alert for the “false” output. Set sendTo to
[YOUR_EMAIL], message toThe product is out of stock so I need 50 more products, and subject to=Product "{{ $json.output.product.title }}" is out of stock. - Credential Required: Connect your
gmailOAuth2credentials in Send Supplier Stock Alert.
output.availability, the Stock Availability Check condition will never match. Ensure the schema in Structured Result Parser matches the agent output.Step 5: Test and Activate Your Workflow
Run a manual test to confirm the scrape, parse, and alert steps work as expected.
- Click Execute Workflow and confirm Scheduled Stock Check triggers Set Item Link → Agent Scrape Product Info → Stock Availability Check.
- Verify the output from Agent Scrape Product Info includes
output.availabilityandoutput.product.title. - If the item is out of stock, confirm an email is sent by Send Supplier Stock Alert. If it is in stock, ensure it routes to No Action When In Stock.
- When everything checks out, toggle the workflow to Active to enable daily monitoring.
Troubleshooting Tips
- Google Sheets permissions trip people up. If rows aren’t writing, check the connected Google account, then verify the spreadsheet is shared with edit access.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- OpenAI outputs depend heavily on your prompt and formatting rules. Default prompts in AI nodes are generic, so add your stock vocabulary early (“backorder,” “preorder,” “limited”) or you’ll be correcting edge cases forever.
Quick Answers
About 30 minutes if your Sheet and accounts are ready.
No. You’ll connect credentials and map a few fields into Google Sheets. The “logic” is simple conditions, not programming.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs and Bright Data usage, which depend on how often you scrape and how many pages you monitor.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you’ll probably want to. You can replace the scheduled trigger with a webhook if you want checks on-demand, and you can swap Gmail alerts for Telegram by adding a Telegram send step after the “Stock Availability Check” decision. Many teams also tweak the AI agent prompt so it recognizes supplier-specific phrases like “ships in 10 days” as “low stock,” then logs that nuance into an extra Google Sheets column.
Most of the time it’s the wrong Google account, missing edit access to the spreadsheet, or a renamed tab that no longer matches your node settings. Reconnect Google Sheets credentials in n8n, then reselect the spreadsheet and worksheet to refresh the mapping. If it still fails, check Google’s security settings for blocked access and confirm the file isn’t in a restricted Shared Drive.
A lot, but it depends on how you run n8n and how fast the supplier sites respond. On n8n Cloud, your monthly execution limit depends on your plan, and each product check can count as its own execution if you loop through items. If you self-host, there’s no execution cap, but you’re still limited by your server and by Bright Data/OpenAI throughput. Practically, most small businesses run dozens of SKUs a few times per day without thinking about it; when you get into hundreds, you’ll want batching and longer intervals.
Often, yes, because this workflow needs scraping, parsing, and conditional logic that can get awkward (and pricey) in simpler tools. n8n handles branching and “do nothing when in stock” cleanly, so you don’t pay extra for every filter. The AI parsing step is also easier to control because you can add structured output parsing and auto-fixing when the model gets creative. Zapier or Make can still work if your stock data already lives in a clean API and you only need a two-step alert. If you’re unsure, Talk to an automation expert and you’ll get a straight recommendation.
Once this is running, low-stock “surprises” turn into simple, boring alerts. That’s the goal. Boring inventory is profitable inventory.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.