17 在庫レベルを追跡する
上級
これはEngineering, AI Summarization分野の自動化ワークフローで、17個のノードを含みます。主にIf, Set, Gmail, McpClientTool, Agentなどのノードを使用。 Amazon在庫レベル追跡の自動化、Bright Data MCPおよびOpenAIを使用
前提条件
- •Googleアカウント + Gmail API認証情報
- •OpenAI API Key
使用ノード (17)
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "UtVgRkTTYi8Xt5vH",
"meta": {
"instanceId": "60046904b104f0f72b2629a9d88fe9f676be4035769f1f08dad1dd38a76b9480",
"templateCredsSetupCompleted": true
},
"name": "17 Track Stock Levels",
"tags": [],
"nodes": [
{
"id": "baadc7a6-3cf9-4e2f-9e40-6b6afb75396b",
"name": "X時間ごとに在庫を確認",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9
}
]
}
},
"typeVersion": 1.2
},
{
"id": "93771587-54b5-4b37-87c0-7497b4ed69fa",
"name": "製品URLを定義",
"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": "製品データをスクレイピング (エージェント経由)",
"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 (チャット)",
"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 (スクレイパー)",
"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": "在庫あり?",
"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": "サプライヤーにメール送信 (在庫切れアラート)",
"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": "何もしない (在庫あり)",
"type": "n8n-nodes-base.noOp",
"position": [
1180,
-100
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4cf70d5b-a40f-495c-ad9b-7f075660f346",
"name": "付箋",
"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": "付箋1",
"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": "付箋2",
"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": "付箋5",
"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": "付箋9",
"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": "付箋4",
"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": "Auto-fixing Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
780,
340
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "0cf6db36-d495-4939-9bc7-a69e01d15cbe",
"name": "OpenAI Chat Model",
"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": "Structured Output Parser",
"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¤cy=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
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - エンジニアリング, AI要約
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
23 顧客生涯価値(CLV)を分析する
Bright Data MCPを使ってGPT-4で高値顧客を分析し、特定する
If
Set
Code
+
If
Set
Code
20 ノードYaron Been
市場調査
10 メールマーケティングキャンペーンの成果を追跡
Bright Data と OpenAI を使ってメールマーケティング活動の分析とスマートフォローアップを自動化
If
Set
Gmail
+
If
Set
Gmail
17 ノードYaron Been
ソーシャルメディア
競合サイトの更新状況を4つ追跡
Bright Data MCPとOpenAIを使用した自動のな競合価格モニタリング
If
Set
Google Sheets
+
If
Set
Google Sheets
18 ノードYaron Been
市場調査
分析ゾーンごとのパフォーマンス
Bright Data MCP と GPT-4o を使用して営業エリアのパフォーマンスを分析する
Set
Code
Gmail
+
Set
Code
Gmail
17 ノードYaron Been
顧客管理
16 競合企業価格を監視
Bright Data MCP と Google Sheets に基づく自動化された競合他社の価格設定モニタリング
Set
Code
Gmail
+
Set
Code
Gmail
18 ノードYaron Been
市場調査
競合製品リリースモニタリング
Bright DataとOpenAIに基づく即時のな競合製品リリース監視、メール/テーブルへの送信
Set
Code
Gmail
+
Set
Code
Gmail
18 ノードYaron Been
市場調査
ワークフロー情報
難易度
上級
ノード数17
カテゴリー2
ノードタイプ11
作成者
Yaron Been
@yaron-nofluffBuilding 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
外部リンク
n8n.ioで表示 →
このワークフローを共有