Automated Amazon Stock Level Tracker and Supplier Alert System - n8n Workflow

Use this powerful n8n workflow template to automatically monitor Amazon product stock levels using Bright Data and OpenAI. Receive immediate Gmail alerts via this n8n automation when stock runs low.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • E-commerce store managers needing to maintain optimal inventory.

  • Supply chain coordinators who require automated restocking alerts.

  • Automation specialists looking for advanced web scraping and AI parsing techniques in an n8n workflow.

  • Users searching for robust n8n templates for retail monitoring.

Overview

Maintaining sufficient stock levels is crucial for e-commerce success. This comprehensive n8n workflow solves the problem of manual stock checking by providing a reliable, automated solution. It leverages a combination of advanced technologies: the Schedule n8n trigger ensures checks run consistently (e.g., daily at 9 AM), Bright Data's Mobile Carrier Proxy (MCP) performs highly resilient web scraping to avoid Amazon blocks, and an OpenAI-powered AI Agent cleans and structures the extracted data. This means the system can reliably determine if an item is 'In Stock' or 'Out of Stock.' If a shortage is detected, the n8n workflow immediately sends a critical Gmail alert to the responsible supplier, minimizing downtime and maximizing sales opportunity. This specific n8n workflow demonstrates best practices for integrating AI and specialized tools within the n8n platform.

How it Works

The entire process is initiated by an n8n trigger: the Schedule Trigger n8n node, set to run at a specific time each day.


  1. Initialization: The n8n workflow starts, and the Define Product URL n8n node sets the specific Amazon URL to be monitored.

  2. Data Scraping Orchestration: The Scrape Product Data (via Agent) AI Agent n8n node takes over. It uses the defined URL and orchestrates the scraping process using various tools.

  3. Resilient Scraping: The Agent utilizes the Bright Data MCP (Scraper) n8n node, which performs the actual, block-resistant web scraping of the Amazon page.

  4. Structured Parsing: The raw scraped data is then funneled through the Structured Output Parser (with the help of the Auto-fixing Output Parser and OpenAI Chat Model n8n nodes) to cleanly extract key fields like the product title and, crucially, the 'availability' status into a standardized JSON format. This parsing step is essential for reliable decision-making later in the n8n workflow.

  5. Decision Logic: The Product In Stock? If n8n node evaluates the parsed 'availability' status.

  6. Action: If the status is 'In Stock,' the n8n workflow takes the True path to the Do Nothing (Stock Available) n8n node and ends. If the status is 'Out of Stock,' the n8n workflow takes the False path, triggering the Email Supplier (Out of Stock Alert) Gmail n8n node, which sends a notification with the product title to the specified email address.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON code and import it into your n8n instance via the 'Workflows' > 'New' > 'Import from JSON' option.

  2. Set Up Credentials:

OpenAI: You will need credentials for your OpenAI account (used by the AI Agent and the parser nodes). Configure the API key in the credentials area.
Bright Data MCP: Set up credentials for the Bright Data MCP Client (used by the scraper node).
* Gmail: Configure the Gmail OAuth2 credentials for the Email Supplier n8n node to allow the n8n workflow to send emails.

  1. Customize the Input: Locate the Define Product URL n8n node and update the Product url value with the Amazon URL you wish to monitor.

  2. Adjust Trigger: Modify the Check Stock Every X Hours n8n trigger parameters if you need to adjust the frequency of checks (e.g., changing it from 9 AM daily to a different interval).

  3. Activate: Ensure the n8n workflow is activated (turned 'on') to begin automated monitoring.

Node Details

This n8n workflow utilizes several key n8n node types to achieve its goal:

Schedule Trigger (Check Stock Every X Hours):
Function: Acts as the primary n8n trigger, initiating the stock check automatically at defined intervals (set to run daily at 9 AM in the provided n8n template).
Key Configuration: rule.interval.triggerAtHour: 9.
Set (Define Product URL):
Function: Defines the crucial input data—the Amazon product URL—used by the rest of the n8n workflow.
Key Configuration: Contains the hardcoded Amazon product URL.
AI Agent (Scrape Product Data):
Function: Coordinates the complex scraping and parsing task, ensuring the correct tools (OpenAI Chat and Bright Data MCP) are used to extract structured data.
Key Configuration: Uses the Product url variable in its prompt.
Bright Data MCP (Scraper):
Function: Executes the robust web scraping necessary to reliably retrieve stock information from Amazon without being blocked.
Key Configuration: Uses the webdataamazon_product tool.
If (Product In Stock?):
Function: Provides critical flow control. It checks the output generated by the AI parser to see if the availability key equals 'In Stock'.
Key Configuration: Condition checks ={{ $json.output.availability }} equals In Stock.
Gmail (Email Supplier):
Function: Executes the final action for the 'Out of Stock' scenario, sending an automated alert email using the product title dynamically pulled from the scraped data.
Key Configuration: Uses expression ={{ $json.output.product.title }} in the subject line.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

Featured*