17 Suivre les niveaux de stock

Avancé

Ceci est unEngineering, AI Summarizationworkflow d'automatisation du domainecontenant 17 nœuds.Utilise principalement des nœuds comme If, Set, Gmail, McpClientTool, Agent. Automatisation du suivi des niveaux de stock Amazon, en utilisant Bright Data MCP et OpenAI

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "UtVgRkTTYi8Xt5vH",
  "meta": {
    "instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480",
    "templateCredsSetupCompleted": true
  },
  "name": "17 Track Stock Levels",
  "tags": [],
  "nodes": [
    {
      "id": "baadc7a6-3cf9-4e2f-9e40-6b6afb75396b",
      "name": "Vérifier le Stock Toutes les X Heures",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "93771587-54b5-4b37-87c0-7497b4ed69fa",
      "name": "Définir l'URL du Produit",
      "type": "n8n-nodes-base.set",
      "position": [
        200,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a6354275-2ea3-4641-915f-194e4da11022",
              "name": "Product url",
              "type": "string",
              "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"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b6c4f0b1-f7c7-4994-aa0d-e52e75d271e4",
      "name": "Extraire les Données Produit (via Agent)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        480,
        0
      ],
      "parameters": {
        "text": "=below is the amazon product and you will scrape the page and tell whether it is still in stock or out of stock:\n{{ $json['Product url'] }}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "95466f92-911a-499f-b9e9-a69c22186c42",
      "name": "OpenAI (Chat)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        440,
        260
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8sEyPDkC5p4w4Jha",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "09ae962a-3047-48cf-b035-5255670177ee",
      "name": "Bright Data MCP (Scraper)",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "position": [
        640,
        260
      ],
      "parameters": {
        "toolName": "web_data_amazon_product",
        "operation": "executeTool",
        "toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', ``, 'json') }}"
      },
      "credentials": {
        "mcpClientApi": {
          "id": "eqq94k789oJCd6jU",
          "name": "MCP Client (STDIO) account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1025b2ae-deb9-43d9-be05-fdf627cf8f8e",
      "name": "Produit en Stock ?",
      "type": "n8n-nodes-base.if",
      "position": [
        960,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2584d28b-adf3-4b1b-8056-2a582874eca3",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.output.availability }}",
              "rightValue": "In Stock"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bb5378f1-9c8a-4040-8428-dfdeb151bf43",
      "name": "Email au Fournisseur (Alerte Rupture de Stock)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1180,
        100
      ],
      "webhookId": "4394f442-c20b-4ed8-a90e-d77332ef9dac",
      "parameters": {
        "sendTo": "shahkar.genai@gmail.com",
        "message": "The product is out of stock so I need 50 more products",
        "options": {},
        "subject": "=Product \"{{ $json.output.product.title }}\" is out of stock"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "AQDSl75AdzK3vmqJ",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "534cc35a-eab6-4ce8-acf9-5ae0df7fb3f9",
      "name": "Ne Rien Faire (Stock Disponible)",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1180,
        -100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4cf70d5b-a40f-495c-ad9b-7f075660f346",
      "name": "Note Adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -820
      ],
      "parameters": {
        "color": 2,
        "width": 380,
        "height": 1000,
        "content": "### 🟩 **SECTION 1: Input Setup & Trigger**\n\n> **📦 What product to check, and how often to check it?**\n\n#### 🧩 Nodes:\n\n1. ⏰ **Check Stock Every X Hours** (Schedule Trigger)\n2. ✏️ **Define Product URL & Threshold** (Edit Fields)\n\n#### 🧠 What This Section Does:\n\n* ⏰ The workflow is automatically triggered based on your chosen time interval (e.g., every 6 hours, every day, etc.).\n* ✍️ You manually or dynamically input the **Amazon product URL** and optional values like desired stock threshold.\n\n#### 🧑‍🏫 Why It’s Important:\n\nThis section **starts the whole process**. Instead of checking manually every day, this runs in the background automatically. If you want to monitor **multiple products**, you can later loop this over a Google Sheet.\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "24f1d984-6116-4e02-bdc4-de19f9b312eb",
      "name": "Note Adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        -1220
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 1400,
        "content": "### 🤖 **SECTION 2: Scraping Product Data from Amazon**\n\n> **💡 Check the current stock status of the product on Amazon.**\n\n#### 🧩 Nodes:\n\n1. 🤖 **Scrape Product Data (via Agent)** (AI Agent)\n2. 🔌 **OpenAI (Chat)** (OpenAI Chat Model)\n3. 📱 **Bright Data MCP (Scraper)** (MCP Client)\n4. 🧠 **Parse Scraped Output** (Structured Output Parser)\n\n#### 🧠 What This Section Does:\n\n* Uses **AI Agent** to coordinate the scraping process.\n* The **MCP Client** uses Bright Data's Mobile Carrier Proxy to load Amazon like a real user from a mobile device (this avoids blocks and sees mobile-specific info like “In Stock” messages).\n* The product page is scraped (title, price, availability, etc.).\n* Finally, **Structured Output Parser** cleans the result into a usable format, like this:\n\n  ```json\n  {\n    \"availability\": \"In Stock\",\n    \"title\": \"UGREEN USB Hub\",\n    \"price\": 9.98\n  }\n  ```\n\n#### 🧑‍🏫 Why It’s Important:\n\nYou’re using **cutting-edge scraping** that mimics human behavior (via MCP), plus **AI** to understand and clean up the data. It saves you from dealing with messy HTML or blocked pages.\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1f7e99a4-6490-4fbb-98ba-f1cb1f53aab0",
      "name": "Note Adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        -680
      ],
      "parameters": {
        "color": 5,
        "width": 380,
        "height": 960,
        "content": "### 📬 **SECTION 3: Decision & Notification**\n\n> **❓ Is the product out of stock? If yes, alert supplier. If no, do nothing.**\n\n#### 🧩 Nodes:\n\n1. 🧭 **Product In Stock?** (If)\n2. ⛔ **Do Nothing (Stock Available)** (No Operation)\n3. 📧 **Email Supplier (Out of Stock Alert)** (Gmail)\n\n#### 🧠 What This Section Does:\n\n* 🧭 It checks the parsed data for `\"availability\": \"In Stock\"`.\n* ✅ If it **is in stock**, the workflow ends silently. No need to disturb anyone.\n* ❌ If it **is out of stock**, it triggers a **Gmail alert** to the supplier so they can take action quickly.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "85dd0b3a-cd34-49b3-a1b4-86e5f3e66fb4",
      "name": "Note Adhésive5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        -680
      ],
      "parameters": {
        "color": 7,
        "width": 380,
        "height": 240,
        "content": "## I’ll receive a tiny commission if you join Bright Data through this link—thanks for fueling more free content!\n\n### https://get.brightdata.com/1tndi4600b25"
      },
      "typeVersion": 1
    },
    {
      "id": "d3e559d3-c8d7-4b57-bc57-bdfdd3f1f652",
      "name": "Note Adhésive9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1720,
        -820
      ],
      "parameters": {
        "color": 4,
        "width": 1300,
        "height": 320,
        "content": "=======================================\n            WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"
      },
      "typeVersion": 1
    },
    {
      "id": "735f2bcf-2d2d-4eb9-8f39-6f2a9f8ef758",
      "name": "Note Adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1720,
        -480
      ],
      "parameters": {
        "color": 4,
        "width": 1289,
        "height": 2618,
        "content": "## 🔄 Track Amazon Product Stock & Alert Supplier Workflow\n\n**Purpose**: Automatically monitor an Amazon product and alert the supplier via Gmail if it's **out of stock**.\n\n---\n\n### 🟩 **SECTION 1: Input Setup & Trigger**\n\n> **📦 What product to check, and how often to check it?**\n\n#### 🧩 Nodes:\n\n1. ⏰ **Check Stock Every X Hours** (Schedule Trigger)\n2. ✏️ **Define Product URL & Threshold** (Edit Fields)\n\n#### 🧠 What This Section Does:\n\n* ⏰ The workflow is automatically triggered based on your chosen time interval (e.g., every 6 hours, every day, etc.).\n* ✍️ You manually or dynamically input the **Amazon product URL** and optional values like desired stock threshold.\n\n#### 🧑‍🏫 Why It’s Important:\n\nThis section **starts the whole process**. Instead of checking manually every day, this runs in the background automatically. If you want to monitor **multiple products**, you can later loop this over a Google Sheet.\n\n---\n\n### 🤖 **SECTION 2: Scraping Product Data from Amazon**\n\n> **💡 Check the current stock status of the product on Amazon.**\n\n#### 🧩 Nodes:\n\n1. 🤖 **Scrape Product Data (via Agent)** (AI Agent)\n2. 🔌 **OpenAI (Chat)** (OpenAI Chat Model)\n3. 📱 **Bright Data MCP (Scraper)** (MCP Client)\n4. 🧠 **Parse Scraped Output** (Structured Output Parser)\n\n#### 🧠 What This Section Does:\n\n* Uses **AI Agent** to coordinate the scraping process.\n* The **MCP Client** uses Bright Data's Mobile Carrier Proxy to load Amazon like a real user from a mobile device (this avoids blocks and sees mobile-specific info like “In Stock” messages).\n* The product page is scraped (title, price, availability, etc.).\n* Finally, **Structured Output Parser** cleans the result into a usable format, like this:\n\n  ```json\n  {\n    \"availability\": \"In Stock\",\n    \"title\": \"UGREEN USB Hub\",\n    \"price\": 9.98\n  }\n  ```\n\n#### 🧑‍🏫 Why It’s Important:\n\nYou’re using **cutting-edge scraping** that mimics human behavior (via MCP), plus **AI** to understand and clean up the data. It saves you from dealing with messy HTML or blocked pages.\n\n---\n\n### 📬 **SECTION 3: Decision & Notification**\n\n> **❓ Is the product out of stock? If yes, alert supplier. If no, do nothing.**\n\n#### 🧩 Nodes:\n\n1. 🧭 **Product In Stock?** (If)\n2. ⛔ **Do Nothing (Stock Available)** (No Operation)\n3. 📧 **Email Supplier (Out of Stock Alert)** (Gmail)\n\n#### 🧠 What This Section Does:\n\n* 🧭 It checks the parsed data for `\"availability\": \"In Stock\"`.\n* ✅ If it **is in stock**, the workflow ends silently. No need to disturb anyone.\n* ❌ If it **is out of stock**, it triggers a **Gmail alert** to the supplier so they can take action quickly.\n\n#### 🧑‍🏫 Why It’s Important:\n\nThis is your **automation trigger**. It helps suppliers restock faster and ensures your business doesn't run into product shortages.\n\n---\n\n## 🧩 Summary View (with Icons)\n\n```\n⏰ Schedule → ✍️ Input Fields\n        ↓\n🤖 AI Agent → 📱 MCP Scraper → 🧠 Output Parser\n        ↓\n🧭 IF → ❌ Do Nothing (In Stock)\n         → 📧 Email Supplier (Out of Stock)\n```\n\n---\n\n### 💡 Beginner Tip:\n\nIf you ever want to monitor **many products**, replace the “Edit Fields” with a **Google Sheets node** that loops over each row — totally no-code-friendly!\n\n---\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "34c9ebf4-f2d0-4a6e-a785-1c21c5ac0126",
      "name": "Analyseur de Sortie Auto-corrigeant",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        780,
        340
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "0cf6db36-d495-4939-9bc7-a69e01d15cbe",
      "name": "Modèle de Chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        760,
        560
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8sEyPDkC5p4w4Jha",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "dbcaa1e9-9e62-4619-b42d-4e52948ece2c",
      "name": "Analyseur de Sortie Structurée",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        920,
        560
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"availability\": \"In Stock\",\n  \"product\": {\n    \"title\": \"UGREEN Revodok 105 USB C Hub 5 in 1 Multiport Adapter\",\n    \"price\": {\n      \"current\": 9.98,\n      \"original\": 15.99,\n      \"currency\": \"USD\"\n    },\n    \"seller\": \"UGREEN GROUP LIMITED\",\n    \"rating\": {\n      \"score\": 4.6,\n      \"total_reviews\": 18381\n    },\n    \"url\": \"https://www.amazon.com/UGREEN-Delivery-Multiport-Adapter-Thinkpad/dp/B0BR3M8XHK?th=1&psc=1&language=en_US&currency=USD\"\n  }\n}\n"
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "83db36de-9559-46a9-9f05-82d017c81632",
  "connections": {
    "95466f92-911a-499f-b9e9-a69c22186c42": {
      "ai_languageModel": [
        [
          {
            "node": "b6c4f0b1-f7c7-4994-aa0d-e52e75d271e4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "0cf6db36-d495-4939-9bc7-a69e01d15cbe": {
      "ai_languageModel": [
        [
          {
            "node": "34c9ebf4-f2d0-4a6e-a785-1c21c5ac0126",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "1025b2ae-deb9-43d9-be05-fdf627cf8f8e": {
      "main": [
        [
          {
            "node": "534cc35a-eab6-4ce8-acf9-5ae0df7fb3f9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "bb5378f1-9c8a-4040-8428-dfdeb151bf43",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "93771587-54b5-4b37-87c0-7497b4ed69fa": {
      "main": [
        [
          {
            "node": "b6c4f0b1-f7c7-4994-aa0d-e52e75d271e4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dbcaa1e9-9e62-4619-b42d-4e52948ece2c": {
      "ai_outputParser": [
        [
          {
            "node": "34c9ebf4-f2d0-4a6e-a785-1c21c5ac0126",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "34c9ebf4-f2d0-4a6e-a785-1c21c5ac0126": {
      "ai_outputParser": [
        [
          {
            "node": "b6c4f0b1-f7c7-4994-aa0d-e52e75d271e4",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "09ae962a-3047-48cf-b035-5255670177ee": {
      "ai_tool": [
        [
          {
            "node": "b6c4f0b1-f7c7-4994-aa0d-e52e75d271e4",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "baadc7a6-3cf9-4e2f-9e40-6b6afb75396b": {
      "main": [
        [
          {
            "node": "93771587-54b5-4b37-87c0-7497b4ed69fa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b6c4f0b1-f7c7-4994-aa0d-e52e75d271e4": {
      "main": [
        [
          {
            "node": "1025b2ae-deb9-43d9-be05-fdf627cf8f8e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Ingénierie, Résumé IA

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds17
Catégorie2
Types de nœuds11
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Yaron Been

Yaron Been

@yaron-nofluff

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

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34