{"workflow":{"id":13961,"name":"Monitor D2C inventory, forecast demand with GPT-4o, and send POs via Google Sheets and Gmail","views":71,"recentViews":1,"totalViews":71,"createdAt":"2026-03-09T09:41:49.421Z","description":"## 📊 Description\nStop finding out you're out of stock after a customer already tried to buy. This workflow monitors your entire product inventory daily, calculates how fast each SKU is selling, and automatically raises purchase orders to your supplier before you hit zero — all without you opening a spreadsheet.\nBuilt for D2C brands and ops teams who are tired of manual stock checks, surprise stockouts, and dead inventory eating up cash. The AI layer adds demand forecasting and tells you exactly what to bundle, discount, or kill every week.\n\n## What This Workflow Does\n⏰ Triggers every morning at 8AM to fetch fresh product and stock data automatically\n🧮 Calculates sales velocity per SKU using a 7-day rolling average from your Sales Log\n🚦 Flags every SKU as 🔴 Stockout Risk, 🟡 Dead Stock, or 🟢 Healthy and updates Google Sheets\n📧 Sends instant email alerts when a SKU is about to run out or has been sitting unsold\n📋 Automatically calculates reorder quantity using lead time and buffer stock formula\n🏭 Emails a formatted Purchase Order directly to your supplier — no manual drafting\n🤖 Sends all dead/slow SKUs to GPT-4o every Sunday for actionable recommendations — bundle, discount, or kill\n📊 Delivers a 30-day demand forecast every Sunday based on 90 days of sales history and seasonal context\n\n## Key Benefits\n✅ Never get caught off guard by a stockout again\n✅ POs go to suppliers automatically — zero manual work\n✅ AI tells you what to do with slow-moving inventory every week\n✅ 30-day demand forecast keeps you buying ahead, not reacting\n✅ Everything logged in Google Sheets — full visibility at all times\n✅ Works with any product catalog — just plug in your Sheet\n\n## How It Works\nThe workflow runs in 5 stages, each timed 5 minutes apart every morning so data flows cleanly from one stage to the next.\n\nStage 1 — Data Sync (8:00 AM daily) Pulls product data from DummyJSON API (swap with your Shopify or WooCommerce endpoint when going live), simulates daily sales per SKU, and writes everything into your Google Sheets inventory log.\n\nStage 2 — Stock Health Check (8:05 AM daily) Reads the last 7 days of sales, calculates average daily velocity per SKU, and assigns a flag. Anything running out in under 14 days gets flagged 🔴. Anything with zero sales in 7 days gets flagged 🟡. Everything else is 🟢. Flags are written back to your sheet and email alerts fire immediately for anything critical.\n\nStage 3 — Auto Reorder Engine (8:10 AM daily) Picks up every 🔴 SKU and runs it through a reorder formula — (avg daily sales × lead time) + 7-day buffer stock. A properly formatted Purchase Order email goes straight to your supplier. Every PO is logged in the PO Tracker sheet with status, quantity, and date.\n\nStage 4 — Dead Inventory AI Digest (Every Sunday 9:00 AM) All 🟡 SKUs get sent to GPT-4o with your stock levels and sales data. The AI comes back with a recommendation for each one — bundle it, run a discount (with exact percentage), or kill the SKU entirely. You get a clean email grouped by urgency: high, medium, low.\n\nStage 5 — 30-Day Demand Forecast (Every Sunday 9:30 AM) Aggregates the last 90 days of sales per SKU and sends it to GPT-4o with the current month for seasonality context. GPT predicts how many units you'll need in the next 30 days, calculates stock gap, and tells you what to reorder now, stock up on, or reduce. Delivered as a clean email report every Sunday morning.\n\n## Features\n- Cron-based daily and weekly automation triggers\n- Sales velocity calculation with 7-day and 90-day rolling windows\n- 3-tier SKU health flagging system (🔴 🟡 🟢)\n- Reorder quantity formula with lead time + buffer stock logic\n- Automated PO generation and supplier email dispatch\n- GPT-4o dead inventory strategist with discount recommendations\n- GPT-4o 30-day demand forecasting with seasonality awareness\n- Full Google Sheets logging across Inventory Master, Sales Log, and PO Tracker\n- Gmail-based alerting and weekly digest reports\n- Modular 5-stage architecture — easy to swap data sources\n\n## Requirements\n- OpenAI API key (GPT-4o access)\n- Google Sheets OAuth2 connection\n- Gmail OAuth2 connection\n- A configured Google Sheet with 3 sheets: Inventory Master, Sales Log, PO Tracker\n- DummyJSON API — free, no key needed (replace with Shopify/WooCommerce for production)\n\n## Setup Steps\n- Copy the Google Sheet template and grab your Sheet ID from the URL\n- Paste the Sheet ID into all Google Sheets nodes (there are 8 of them)\n- Connect your Google Sheets OAuth2 credentials\n- Connect your Gmail OAuth2 credentials\n- Add your OpenAI API key to both GPT-4o nodes\n- Replace the email address in all Gmail nodes with your own\n- Activate all triggers — the system runs itself from here\n\n## Target Audience\n🛒 D2C brand owners managing inventory without a dedicated ops team\n📦 E-commerce operators tired of manual stock checks and surprise stockouts\n💼 Operations managers who want a real-time view of inventory health\n🤖 Automation agencies building supply chain solutions for e-commerce clients\n","workflow":{"id":"ZNZoKQqrjNYW86W1","meta":{"instanceId":"8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177","templateCredsSetupCompleted":true},"name":"AI-Powered D2C Supply Chain That Monitors Inventory and Raises POs Automatically","tags":[],"nodes":[{"id":"0620182f-f823-4314-bef7-b0407101813a","name":"Read Inventory Master","type":"n8n-nodes-base.googleSheets","position":[160,368],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=0","cachedResultName":"Inventory Master"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":true,"typeVersion":4.2},{"id":"f50a2acb-4424-41c8-9ac0-18e46b90694e","name":"Read Sales Log","type":"n8n-nodes-base.googleSheets","position":[368,368],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":1969703549,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=1969703549","cachedResultName":"Sales Log"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":true,"typeVersion":4.2},{"id":"c3eea98f-c39b-4614-b3bd-94b9a70338ed","name":"IF Dead or Overstock","type":"n8n-nodes-base.if","position":[1200,480],"parameters":{"options":{},"conditions":{"options":{"version":1,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5844217f-de21-4899-8a2e-074eeb28dd03","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json.flag }}","rightValue":"🟡"}]}},"typeVersion":2},{"id":"ef6ce76b-5d3b-4d00-8e3d-d6c41344499d","name":"IF Stockout Risk","type":"n8n-nodes-base.if","position":[784,368],"parameters":{"options":{},"conditions":{"options":{"version":1,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"0f4652d3-0d18-4a8c-8708-52771aed2ffb","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json.flag }}","rightValue":"🔴"}]}},"typeVersion":2},{"id":"9377ea2f-47f6-4ae2-b7ef-3f8be41c343c","name":"Read Inventory Master1","type":"n8n-nodes-base.googleSheets","position":[176,864],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=0","cachedResultName":"Inventory Master"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":true,"typeVersion":4.2},{"id":"1602da5d-5c06-4cdb-aca2-f6e7bd303f89","name":"Read Inventory Master2","type":"n8n-nodes-base.googleSheets","position":[224,1216],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=0","cachedResultName":"Inventory Master"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":true,"typeVersion":4.2},{"id":"c83fe074-7e1c-4c43-9ca3-da59ad4a2f53","name":"Read sales log","type":"n8n-nodes-base.googleSheets","position":[208,1600],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":1969703549,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=1969703549","cachedResultName":"Sales Log"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":true,"typeVersion":4.2},{"id":"ffab12e1-850f-4494-b434-d7d019be6012","name":"Read Inventory Master3","type":"n8n-nodes-base.googleSheets","position":[464,1600],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=0","cachedResultName":"Inventory Master"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":true,"typeVersion":4.2},{"id":"5186099d-1f5f-4452-88b8-8e207ad7b9f2","name":"Build Forecast Prompt","type":"n8n-nodes-base.code","position":[880,1600],"parameters":{"jsCode":"const skus = items.map(i => i.json);\nconst month = new Date().toLocaleString('default', { month: 'long' });\n\nreturn [{\n  json: {\n    prompt: `You are a D2C demand forecasting expert. Based on the last 90 days of sales data, predict demand for the next 30 days for each SKU.\n\nCurrent month: ${month}\n\nConsider:\n- Seasonal trends for this month\n- Sales velocity from last 90 days\n- Product category demand patterns\n- Festival/holiday seasons if applicable\n\nRespond ONLY in this JSON format:\n{\n  \"forecast_month\": \"string\",\n  \"forecasts\": [\n    {\n      \"sku_id\": \"string\",\n      \"product_name\": \"string\",\n      \"category\": \"string\",\n      \"predicted_units_30d\": number,\n      \"current_stock\": number,\n      \"stock_needed\": number,\n      \"action\": \"reorder now | stock up | sufficient | reduce\",\n      \"seasonality_note\": \"string\",\n      \"confidence\": \"high | medium | low\"\n    }\n  ]\n}\n\nRules:\n- stock_needed = predicted_units_30d - current_stock (if negative set to 0)\n- If stock_needed > 0: action = reorder now or stock up\n- If current_stock > predicted_units_30d * 2: action = reduce\n- Otherwise: action = sufficient\n- Add seasonality_note based on month and category\n\nSales Data:\n${JSON.stringify(skus, null, 2)}`\n  }\n}];"},"typeVersion":2},{"id":"068f460e-5619-4ab0-b888-795d31a74786","name":"Build Forecast Email","type":"n8n-nodes-base.code","position":[1872,1600],"parameters":{"jsCode":"const forecasts = items;\nconst month = forecasts[0]?.json.forecast_month || 'This Month';\n\nlet email = `D2C Demand Forecast Report — ${month}\\n`;\nemail += `Generated: ${new Date().toDateString()}\\n`;\nemail += `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\n\\n`;\n\nconst reorder = forecasts.filter(f => f.json.action === 'reorder now');\nconst stockUp = forecasts.filter(f => f.json.action === 'stock up');\nconst reduce = forecasts.filter(f => f.json.action === 'reduce');\n\nif (reorder.length > 0) {\n  email += `🚨 REORDER NOW\\n\\n`;\n  reorder.forEach(f => {\n    email += `Product: ${f.json.product_name}\\n`;\n    email += `Predicted Demand (30d): ${f.json.predicted_units_30d} units\\n`;\n    email += `Current Stock: ${f.json.current_stock} units\\n`;\n    email += `Units to Order: ${f.json.stock_needed} units\\n`;\n    email += `Note: ${f.json.seasonality_note}\\n`;\n    email += `Confidence: ${f.json.confidence}\\n\\n`;\n  });\n}\n\nif (stockUp.length > 0) {\n  email += `📦 STOCK UP SOON\\n\\n`;\n  stockUp.forEach(f => {\n    email += `Product: ${f.json.product_name}\\n`;\n    email += `Predicted Demand (30d): ${f.json.predicted_units_30d} units\\n`;\n    email += `Units to Order: ${f.json.stock_needed} units\\n`;\n    email += `Note: ${f.json.seasonality_note}\\n\\n`;\n  });\n}\n\nif (reduce.length > 0) {\n  email += `⬇️ CONSIDER REDUCING\\n\\n`;\n  reduce.forEach(f => {\n    email += `Product: ${f.json.product_name} — overstock likely next 30 days\\n`;\n  });\n}\n\nemail += `\\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\n`;\nemail += `Total SKUs needing action: ${forecasts.length}`;\n\nreturn [{ json: { email_body: email, total_action: forecasts.length, month } }];"},"typeVersion":2},{"id":"bde2be38-dadd-40d9-ba76-3293523b4474","name":"🕐 Daily 8AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[16,-64],"parameters":{"rule":{"interval":[{"triggerAtHour":8}]}},"typeVersion":1.3},{"id":"1a31a9c6-e84e-4d1c-97d6-2a1de903b70d","name":"Fetch Products (DummyJSON)","type":"n8n-nodes-base.httpRequest","position":[224,-64],"parameters":{"url":"https://dummyjson.com/products?limit=20","options":{}},"typeVersion":4.3},{"id":"bedcf14a-df6e-49f1-ba87-c28776d02d22","name":"Simulate Daily Sales","type":"n8n-nodes-base.code","position":[432,-64],"parameters":{"jsCode":"const products = items[0].json.products;\n\nreturn products.map(p => {\n  const unitsSold = Math.floor(Math.random() * 15) + 1;\n  const remaining = p.stock - unitsSold;\n  return {\n    json: {\n      sku_id: p.id,\n      product_name: p.title,\n      category: p.category,\n      current_stock: p.stock,\n      units_sold: unitsSold,\n      remaining_stock: remaining < 0 ? 0 : remaining,\n      supplier_email: \"user@example.com\",\n      reorder_point: 20,\n      lead_time_days: 7,\n      status: \"active\",\n      date: new Date().toISOString().split('T')[0]\n    }\n  };\n});"},"typeVersion":2},{"id":"3fa0f789-297b-4700-9f9b-112a839559ae","name":"Log to Sales Log","type":"n8n-nodes-base.googleSheets","position":[640,-64],"parameters":{"columns":{"value":{"date":"={{ $json.date }}","sku_id":"={{ $json.sku_id }}","units_sold":"={{ $json.units_sold }}","product_name":"={{ $json.product_name }}","remaining_stock":"={{ $json.remaining_stock }}"},"schema":[{"id":"date","type":"string","display":true,"required":false,"displayName":"date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sku_id","type":"string","display":true,"required":false,"displayName":"sku_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"product_name","type":"string","display":true,"required":false,"displayName":"product_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"units_sold","type":"string","display":true,"required":false,"displayName":"units_sold","defaultMatch":false,"canBeUsedToMatch":true},{"id":"remaining_stock","type":"string","display":true,"required":false,"displayName":"remaining_stock","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":1969703549,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=1969703549","cachedResultName":"Sales Log"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":false,"typeVersion":4.7},{"id":"19ba04ad-07a7-4e3e-9e8a-ad08eeadcb82","name":"Write to Inventory Master","type":"n8n-nodes-base.googleSheets","position":[816,-64],"parameters":{"columns":{"value":{"sku_id":"={{ $('Simulate Daily Sales').item.json.sku_id }}","status":"={{ \"active\" }}","category":"={{ $('Simulate Daily Sales').item.json.category }}","product_name":"={{ $('Simulate Daily Sales').item.json.product_name }}","current_stock":"={{ $('Simulate Daily Sales').item.json.current_stock }}","reorder_point":"={{ $('Simulate Daily Sales').item.json.reorder_point }}","lead_time_days":"={{ $('Simulate Daily Sales').item.json.lead_time_days }}","supplier_email":"={{ $('Simulate Daily Sales').item.json.supplier_email }}"},"schema":[{"id":"sku_id","type":"string","display":true,"removed":false,"required":false,"displayName":"sku_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"product_name","type":"string","display":true,"removed":false,"required":false,"displayName":"product_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"category","type":"string","display":true,"removed":false,"required":false,"displayName":"category","defaultMatch":false,"canBeUsedToMatch":true},{"id":"current_stock","type":"string","display":true,"removed":false,"required":false,"displayName":"current_stock","defaultMatch":false,"canBeUsedToMatch":true},{"id":"reorder_point","type":"string","display":true,"removed":false,"required":false,"displayName":"reorder_point","defaultMatch":false,"canBeUsedToMatch":true},{"id":"lead_time_days","type":"string","display":true,"removed":false,"required":false,"displayName":"lead_time_days","defaultMatch":false,"canBeUsedToMatch":true},{"id":"supplier_email","type":"string","display":true,"removed":false,"required":false,"displayName":"supplier_email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":false,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"avg_daily_sales","type":"string","display":true,"removed":true,"required":false,"displayName":"avg_daily_sales","defaultMatch":false,"canBeUsedToMatch":true},{"id":"days_remaining","type":"string","display":true,"removed":true,"required":false,"displayName":"days_remaining","defaultMatch":false,"canBeUsedToMatch":true},{"id":"flag","type":"string","display":true,"removed":true,"required":false,"displayName":"flag","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=0","cachedResultName":"Inventory Master"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":false,"typeVersion":4.7},{"id":"54ec7660-44a0-4a71-93c6-810d56611026","name":"Daily 8:05AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-32,368],"parameters":{"rule":{"interval":[{"triggerAtHour":8,"triggerAtMinute":5}]}},"typeVersion":1.1},{"id":"2aa23deb-d39f-4991-bc4b-dda02f0df9ec","name":"Calculate Velocity & Flags","type":"n8n-nodes-base.code","position":[576,368],"parameters":{"jsCode":"const inventory = $('Read Inventory Master').all();\nconst salesLog = $('Read Sales Log').all();\n\nconst today = new Date();\nconst sevenDaysAgo = new Date(today - 7 * 24 * 60 * 60 * 1000);\n\nreturn inventory.map(item => {\n  const sku = item.json.sku_id;\n\n  const recentSales = salesLog.filter(s => {\n    const saleDate = new Date(s.json.date);\n    return s.json.sku_id == sku && saleDate >= sevenDaysAgo;\n  });\n\n  const totalSold = recentSales.reduce((sum, s) => sum + Number(s.json.units_sold), 0);\n  const avgDailySales = totalSold / 7;\n  const currentStock = Number(item.json.current_stock);\n  const daysRemaining = avgDailySales > 0 ? Math.floor(currentStock / avgDailySales) : 999;\n\n  let flag = '🟢 Healthy';\n  if (daysRemaining < 14) flag = '🔴 Stockout Risk';\n  else if (totalSold === 0) flag = '🟡 Dead Stock';\n  else if (daysRemaining > 60) flag = '🟡 Overstock';\n\n  return {\n    json: {\n      sku_id: sku,\n      product_name: item.json.product_name,\n      category: item.json.category,\n      current_stock: currentStock,\n      avg_daily_sales: avgDailySales.toFixed(2),\n      days_remaining: daysRemaining,\n      flag,\n      supplier_email: item.json.supplier_email,\n      date: new Date().toISOString().split('T')[0]\n    }\n  };\n});"},"typeVersion":2},{"id":"14ccf51c-ea11-4931-9d81-09f6556809e3","name":"Alert — Stockout Risk","type":"n8n-nodes-base.gmail","position":[1168,256],"webhookId":"e617e79f-361a-49a7-8d46-0deca458a3bf","parameters":{"sendTo":"={{ $json.supplier_email }}","message":"=Product: {{ $json.product_name }}\nCategory: {{ $json.category }}\nCurrent Stock: {{ $json.current_stock }} units\nDays Remaining: {{ $json.days_remaining }} days\nAvg Daily Sales: {{ $json.avg_daily_sales }} units/day\n\nAction: Reorder immediately before stockout.","options":{},"subject":"=🔴 Stockout Alert — {{ $json.product_name }}","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"credential-id","name":"Gmail credentials"}},"typeVersion":2.1},{"id":"0feee8fb-8e80-4c46-b0f3-88eb33d85d82","name":"Alert — Dead Stock","type":"n8n-nodes-base.gmail","position":[1456,480],"webhookId":"3b96eedd-2431-4aea-b0da-955700805325","parameters":{"sendTo":"={{ $json.supplier_email }}","message":"=Product: {{ $json.product_name }}\nCategory: {{ $json.category }}\nCurrent Stock: {{ $json.current_stock }} units\nDays Remaining: {{ $json.days_remaining }} days\nLast 7 days sold: 0 units\n\nAction: Review pricing, create a bundle, or consider discontinuing.","options":{},"subject":"=🟡 Dead Stock Warning — {{ $json.product_name }}","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"credential-id","name":"Gmail credentials"}},"typeVersion":2.1},{"id":"45503525-894c-4456-bf01-c15db6f485a2","name":"Update Flags (Stockout)","type":"n8n-nodes-base.googleSheets","position":[1408,256],"parameters":{"columns":{"value":{"flag":"={{ $('IF Stockout Risk').item.json.flag }}","sku_id":"={{ $('IF Stockout Risk').item.json.sku_id }}","product_name":"={{ $('IF Stockout Risk').item.json.product_name }}","days_remaining":"={{ $('IF Stockout Risk').item.json.days_remaining }}","avg_daily_sales":"={{ $('IF Stockout Risk').item.json.avg_daily_sales }}"},"schema":[{"id":"sku_id","type":"string","display":true,"removed":false,"required":false,"displayName":"sku_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"product_name","type":"string","display":true,"removed":false,"required":false,"displayName":"product_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"category","type":"string","display":true,"removed":true,"required":false,"displayName":"category","defaultMatch":false,"canBeUsedToMatch":true},{"id":"current_stock","type":"string","display":true,"removed":true,"required":false,"displayName":"current_stock","defaultMatch":false,"canBeUsedToMatch":true},{"id":"reorder_point","type":"string","display":true,"removed":true,"required":false,"displayName":"reorder_point","defaultMatch":false,"canBeUsedToMatch":true},{"id":"lead_time_days","type":"string","display":true,"removed":true,"required":false,"displayName":"lead_time_days","defaultMatch":false,"canBeUsedToMatch":true},{"id":"supplier_email","type":"string","display":true,"removed":true,"required":false,"displayName":"supplier_email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":true,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"avg_daily_sales","type":"string","display":true,"removed":false,"required":false,"displayName":"avg_daily_sales","defaultMatch":false,"canBeUsedToMatch":true},{"id":"days_remaining","type":"string","display":true,"removed":false,"required":false,"displayName":"days_remaining","defaultMatch":false,"canBeUsedToMatch":true},{"id":"flag","type":"string","display":true,"removed":false,"required":false,"displayName":"flag","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"number","display":true,"removed":true,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["sku_id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=0","cachedResultName":"Inventory Master"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"typeVersion":4.2},{"id":"b8be79b7-3b1b-4248-b9f9-2d9671e6a386","name":"Update Flags (Dead Stock)","type":"n8n-nodes-base.googleSheets","position":[1648,480],"parameters":{"columns":{"value":{"flag":"={{ $('IF Dead or Overstock').item.json.flag }}","sku_id":"={{ $('IF Dead or Overstock').item.json.sku_id }}","days_remaining":"={{ $('IF Dead or Overstock').item.json.days_remaining }}","avg_daily_sales":"={{ $('IF Dead or Overstock').item.json.avg_daily_sales }}"},"schema":[{"id":"sku_id","type":"string","display":true,"removed":false,"required":false,"displayName":"sku_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"product_name","type":"string","display":true,"removed":true,"required":false,"displayName":"product_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"category","type":"string","display":true,"removed":true,"required":false,"displayName":"category","defaultMatch":false,"canBeUsedToMatch":true},{"id":"current_stock","type":"string","display":true,"removed":true,"required":false,"displayName":"current_stock","defaultMatch":false,"canBeUsedToMatch":true},{"id":"reorder_point","type":"string","display":true,"removed":true,"required":false,"displayName":"reorder_point","defaultMatch":false,"canBeUsedToMatch":true},{"id":"lead_time_days","type":"string","display":true,"removed":true,"required":false,"displayName":"lead_time_days","defaultMatch":false,"canBeUsedToMatch":true},{"id":"supplier_email","type":"string","display":true,"removed":true,"required":false,"displayName":"supplier_email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":true,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"avg_daily_sales","type":"string","display":true,"removed":false,"required":false,"displayName":"avg_daily_sales","defaultMatch":false,"canBeUsedToMatch":true},{"id":"days_remaining","type":"string","display":true,"removed":false,"required":false,"displayName":"days_remaining","defaultMatch":false,"canBeUsedToMatch":true},{"id":"flag","type":"string","display":true,"removed":false,"required":false,"displayName":"flag","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"number","display":true,"removed":true,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["sku_id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=0","cachedResultName":"Inventory Master"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"typeVersion":4.2},{"id":"4dac2963-f047-42cc-83a1-f1a5c91f2d03","name":"Daily 8:10AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-32,864],"parameters":{"rule":{"interval":[{"triggerAtHour":8,"triggerAtMinute":10}]}},"typeVersion":1.1},{"id":"9ab21aa5-8d68-4ea2-928c-455f7eac796a","name":"Filter Stockout SKUs","type":"n8n-nodes-base.if","position":[432,864],"parameters":{"options":{},"conditions":{"options":{"version":1,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"0f4652d3-0d18-4a8c-8708-52771aed2ffb","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json.flag }}","rightValue":"🔴"}]}},"typeVersion":2},{"id":"881626ca-0549-4ba2-b94f-1559f0754976","name":"Calculate Reorder Quantity","type":"n8n-nodes-base.code","position":[688,848],"parameters":{"jsCode":"return items.map(item => {\n  const avgDailySales = Number(item.json.avg_daily_sales);\n  const leadTimeDays = Number(item.json.lead_time_days) || 7;\n  const currentStock = Number(item.json.current_stock);\n\n  // Skip if avg_daily_sales is 0 (SW2 hasn't populated it yet)\n  if (avgDailySales === 0) {\n    return {\n      json: {\n        ...item.json,\n        skipped: true,\n        skip_reason: \"avg_daily_sales is 0 — SW2 may not have run yet\"\n      }\n    };\n  }\n\n  const bufferStock = Math.ceil(avgDailySales * 7);\n  const reorderQty = Math.ceil((avgDailySales * leadTimeDays) + bufferStock - currentStock);\n  const poNumber = `PO-${item.json.sku_id}-${Date.now()}`;\n\n  return {\n    json: {\n      ...item.json,\n      skipped: false,\n      reorder_qty: reorderQty > 0 ? reorderQty : 10,\n      buffer_stock: bufferStock,\n      po_number: poNumber,\n      po_date: new Date().toISOString().split('T')[0]\n    }\n  };\n});"},"typeVersion":2},{"id":"b5d419e0-0a13-46e4-b2fe-37329e91720b","name":"Skip Zero-Velocity SKUs","type":"n8n-nodes-base.filter","position":[896,848],"parameters":{"options":{},"conditions":{"options":{"version":3,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"76dc6fbd-9e47-4fcf-842a-150737045ae4","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.skipped }}","rightValue":"=false"}]},"looseTypeValidation":true},"typeVersion":2.3},{"id":"c7632c00-f89d-43b7-86cf-ba8cfb803a9d","name":"Send PO to Supplier","type":"n8n-nodes-base.gmail","position":[1152,848],"webhookId":"3b96eedd-2431-4aea-b0da-955700805325","parameters":{"sendTo":"={{ \"forreferal04@gmail.com\" || !$json.supplier_email }}","message":"=Dear Supplier,\n\nPlease find below our purchase order details:\n\nPO Number: {{ $json.po_number }}\nDate: {{ $json.po_date }}\n\nProduct: {{ $json.product_name }}\nSKU ID: {{ $json.sku_id }}\nQuantity Required: {{ $json.reorder_qty }} units\n\nCurrent Stock: {{ $json.current_stock }} units\nExpected Stockout In: {{ $json.days_remaining }} days\n\nPlease confirm availability and expected delivery date.","options":{},"subject":"=Purchase Order {{ $json.po_number }} — {{ $json.product_name }}","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"credential-id","name":"Gmail credentials"}},"typeVersion":2.1},{"id":"550d47a4-1b60-4d46-b894-a308292c49d9","name":"Log PO to Tracker","type":"n8n-nodes-base.googleSheets","position":[1424,848],"parameters":{"columns":{"value":{"status":"={{ \"Sent\" }}","sku_id ":"={{ $('Calculate Reorder Quantity').item.json.sku_id }}","quantity":"={{ $('Calculate Reorder Quantity').item.json.reorder_qty }}","po_number":"={{ $('Calculate Reorder Quantity').item.json.po_number }}","date_raised":"={{ $('Calculate Reorder Quantity').item.json.po_date }}","product_name":"={{ $('Calculate Reorder Quantity').item.json.product_name }}","supplier_email":"={{ $('Calculate Reorder Quantity').item.json.supplier_email }}"},"schema":[{"id":"po_number","type":"string","display":true,"removed":false,"required":false,"displayName":"po_number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sku_id ","type":"string","display":true,"removed":false,"required":false,"displayName":"sku_id ","defaultMatch":false,"canBeUsedToMatch":true},{"id":"product_name","type":"string","display":true,"required":false,"displayName":"product_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"quantity","type":"string","display":true,"removed":false,"required":false,"displayName":"quantity","defaultMatch":false,"canBeUsedToMatch":true},{"id":"supplier_email","type":"string","display":true,"removed":false,"required":false,"displayName":"supplier_email","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":false,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"date_raised","type":"string","display":true,"removed":false,"required":false,"displayName":"date_raised","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":2137496817,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit#gid=2137496817","cachedResultName":"PO Tracker"},"documentId":{"__rl":true,"mode":"list","value":"1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1F_dtklvZsxtENwuDGk_lxFLDjWgKqmaBdDm99GLNraY/edit?usp=drivesdk","cachedResultName":"D2C Supply Chain Brain"}},"credentials":{"googleSheetsOAuth2Api":{"id":"credential-id","name":"automations@techdome.ai"}},"executeOnce":false,"typeVersion":4.7},{"id":"6d9acff7-f4dd-4066-b975-f395b92851e8","name":"Notify — PO Raised","type":"n8n-nodes-base.gmail","position":[1648,848],"webhookId":"3b96eedd-2431-4aea-b0da-955700805325","parameters":{"sendTo":"={{ $json.supplier_email }}","message":"=PO {{ $json.po_number }} has been sent to {{ $json.supplier_email }}\n\nProduct: {{ $json.product_name }}\nQuantity Ordered: {{ $('Calculate Reorder Quantity').item.json.reorder_qty }} units\nReason: Stock will run out in {{ $('Calculate Reorder Quantity').item.json.days_remaining }} days","options":{},"subject":"=✅ PO Raised — {{ $json.product_name }}","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"credential-id","name":"Gmail credentials"}},"typeVersion":2.1},{"id":"a9a0e2dc-b3ec-4fb2-b97a-a8feaa22c28a","name":"Weekly Sunday 9AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-32,1216],"parameters":{"rule":{"interval":[{"field":"weeks","triggerAtHour":9}]}},"typeVersion":1.1},{"id":"fbcc1836-0d7c-4567-965d-7dba92c56f60","name":"Filter Dead & Overstock SKUs","type":"n8n-nodes-base.if","position":[448,1216],"parameters":{"options":{},"conditions":{"options":{"version":1,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5844217f-de21-4899-8a2e-074eeb28dd03","operator":{"type":"string","operation":"contains"},"leftValue":"={{ $json.flag }}","rightValue":"🟡"}]}},"typeVersion":2},{"id":"bc88e652-9cd7-4f3b-a4fe-d71f7cc76b5f","name":"Build GPT Prompt","type":"n8n-nodes-base.code","position":[704,1200],"parameters":{"jsCode":"const skus = items.map(item => ({\n  sku_id: item.json.sku_id,\n  product_name: item.json.product_name,\n  category: item.json.category,\n  current_stock: item.json.current_stock,\n  avg_daily_sales: item.json.avg_daily_sales,\n  days_remaining: item.json.days_remaining,\n  flag: item.json.flag\n}));\n\nreturn [{\n  json: {\n    prompt: `You are a D2C inventory strategist. Analyze the following slow-moving or dead stock SKUs and recommend actions.\n\nFor each SKU respond ONLY in this JSON format:\n{\n  \"recommendations\": [\n    {\n      \"sku_id\": \"string\",\n      \"product_name\": \"string\",\n      \"flag\": \"string\",\n      \"action\": \"bundle | discount | kill | monitor\",\n      \"discount_percent\": number or null,\n      \"reason\": \"string\",\n      \"urgency\": \"high | medium | low\"\n    }\n  ]\n}\n\nSKU Data:\n${JSON.stringify(skus, null, 2)}\n\nRules:\n- If stock > 100 and daily sales < 1: recommend kill or heavy discount (30-50%)\n- If stock 50-100 and daily sales < 2: recommend bundle or moderate discount (15-25%)\n- If days_remaining > 60: recommend monitor or light discount (10-15%)\n- Always give a clear reason`\n  }\n}];"},"typeVersion":2},{"id":"9f5e2a85-dcc3-4417-bd05-9e1a92ce6d46","name":"Inventory Strategist","type":"@n8n/n8n-nodes-langchain.openAi","position":[912,1200],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"responses":{"values":[{"content":"={{ $json.prompt }}"}]},"builtInTools":{}},"credentials":{"openAiApi":{"id":"credential-id","name":"OpenAi account 2"}},"typeVersion":2.1},{"id":"19c59165-b6fd-4720-9692-7ad8f486a4dc","name":"Parse AI Recommendations","type":"n8n-nodes-base.code","position":[1312,1200],"parameters":{"jsCode":"const response = items[0].json.output[0].content[0].text;\nconst cleaned = response.replace(/```json|```/g, '').trim();\nconst parsed = JSON.parse(cleaned);\n\nreturn parsed.recommendations.map(rec => ({\n  json: rec\n}));"},"typeVersion":2},{"id":"e7fa7049-e1c8-4522-81c5-01268c567303","name":"Build Weekly Digest Email","type":"n8n-nodes-base.code","position":[1584,1200],"parameters":{"jsCode":"const recs = items;\n\nlet emailBody = `D2C Supply Chain — Weekly Dead Inventory Report\\n`;\nemailBody += `Generated: ${new Date().toDateString()}\\n`;\nemailBody += `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\n\\n`;\n\nconst high = recs.filter(r => r.json.urgency === 'high');\nconst medium = recs.filter(r => r.json.urgency === 'medium');\nconst low = recs.filter(r => r.json.urgency === 'low');\n\nif (high.length > 0) {\n  emailBody += `🔴 HIGH URGENCY (Act This Week)\\n\\n`;\n  high.forEach(r => {\n    emailBody += `Product: ${r.json.product_name}\\n`;\n    emailBody += `Action: ${r.json.action.toUpperCase()}`;\n    if (r.json.discount_percent) emailBody += ` — ${r.json.discount_percent}% off`;\n    emailBody += `\\nReason: ${r.json.reason}\\n\\n`;\n  });\n}\n\nif (medium.length > 0) {\n  emailBody += `🟡 MEDIUM URGENCY (Act This Month)\\n\\n`;\n  medium.forEach(r => {\n    emailBody += `Product: ${r.json.product_name}\\n`;\n    emailBody += `Action: ${r.json.action.toUpperCase()}`;\n    if (r.json.discount_percent) emailBody += ` — ${r.json.discount_percent}% off`;\n    emailBody += `\\nReason: ${r.json.reason}\\n\\n`;\n  });\n}\n\nif (low.length > 0) {\n  emailBody += `🟢 LOW URGENCY (Monitor)\\n\\n`;\n  low.forEach(r => {\n    emailBody += `Product: ${r.json.product_name} — ${r.json.action.toUpperCase()}\\n`;\n  });\n}\n\nemailBody += `\\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\\n`;\nemailBody += `Total SKUs flagged: ${recs.length}`;\n\nreturn [{ json: { email_body: emailBody, total_flagged: recs.length } }];"},"typeVersion":2},{"id":"c15efca7-1dd2-44cb-8546-6b5fc54eb591","name":"Send Weekly Digest","type":"n8n-nodes-base.gmail","position":[1840,1200],"webhookId":"3b96eedd-2431-4aea-b0da-955700805325","parameters":{"sendTo":"= your_email_id","message":"={{ $json.email_body }}","options":{},"subject":"=📦 Weekly Dead Inventory Report — {{ $json.total_flagged }} SKUs Need Attention","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"credential-id","name":"Gmail credentials"}},"typeVersion":2.1},{"id":"b4ba5ab1-ba8e-4afe-838b-2773dd798453","name":"Weekly Sunday 9:30AM Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[0,1600],"parameters":{"rule":{"interval":[{"field":"weeks","triggerAtHour":9,"triggerAtMinute":30}]}},"typeVersion":1.1},{"id":"f43d4ac3-1246-4900-be86-ab15e9878f5c","name":"Aggregate 90 Day Sales","type":"n8n-nodes-base.code","position":[672,1600],"parameters":{"jsCode":"const salesLog = $('Read sales log').all();\nconst inventory = $('Read Inventory Master3').all();\n\nconst today = new Date();\nconst ninetyDaysAgo = new Date(today - 90 * 24 * 60 * 60 * 1000);\n\n// Group sales by SKU\nconst skuSales = {};\nsalesLog.forEach(s => {\n  const saleDate = new Date(s.json.date);\n  if (saleDate >= ninetyDaysAgo) {\n    const sku = String(s.json.sku_id);\n    if (!skuSales[sku]) skuSales[sku] = { total_sold: 0, days_count: 0 };\n    skuSales[sku].total_sold += Number(s.json.units_sold);\n    skuSales[sku].days_count += 1;\n  }\n});\n\n// Merge with inventory\nconst result = inventory.map(item => {\n  const sku = String(item.json.sku_id);\n  const sales = skuSales[sku] || { total_sold: 0, days_count: 0 };\n  const avgDaily = sales.days_count > 0 ? (sales.total_sold / sales.days_count).toFixed(2) : 0;\n\n  return {\n    json: {\n      sku_id: sku,\n      product_name: item.json.product_name,\n      category: item.json.category,\n      current_stock: item.json.current_stock,\n      total_sold_90d: sales.total_sold,\n      avg_daily_sales_90d: avgDaily,\n      lead_time_days: item.json.lead_time_days || 7\n    }\n  };\n});\n\nreturn result;"},"typeVersion":2},{"id":"2034f56f-9831-4cb5-818d-6ad551378384","name":"Demand Forecaster","type":"@n8n/n8n-nodes-langchain.openAi","position":[1072,1600],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"responses":{"values":[{"content":"={{ $json.prompt }}"}]},"builtInTools":{}},"credentials":{"openAiApi":{"id":"credential-id","name":"OpenAi account 2"}},"typeVersion":2.1},{"id":"2ea28460-d886-441a-abaa-b19370fa58fa","name":"Parse Forecast Response","type":"n8n-nodes-base.code","position":[1440,1600],"parameters":{"jsCode":"const response = items[0].json.output[0].content[0].text;\nconst cleaned = response.replace(/```json|```/g, '').trim();\nconst parsed = JSON.parse(cleaned);\n\nreturn parsed.forecasts.map(f => ({\n  json: {\n    ...f,\n    forecast_month: parsed.forecast_month\n  }\n}));"},"typeVersion":2},{"id":"fb22c616-16fa-4330-a3fc-8077a096bf01","name":"Filter Actionable SKUs","type":"n8n-nodes-base.filter","position":[1648,1600],"parameters":{"options":{},"conditions":{"options":{"version":3,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ac4cb7c4-eb57-416f-99da-a4ab3d12a140","operator":{"type":"string","operation":"notEquals"},"leftValue":"={{ $json.action }}","rightValue":"={{ \"sufficient\" }}"}]}},"typeVersion":2.3},{"id":"95f32b05-b06f-4e95-99bc-60377e400c05","name":"Send Forecast Report","type":"n8n-nodes-base.gmail","position":[2096,1600],"webhookId":"3b96eedd-2431-4aea-b0da-955700805325","parameters":{"sendTo":"= your_email_id","message":"={{ $json.email_body }}","options":{},"subject":"=📊 30-Day Demand Forecast — {{ $json.total_action }} SKUs Need Action — {{ $json.month }}","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"credential-id","name":"Gmail credentials"}},"typeVersion":2.1},{"id":"e4d83949-0cd3-4ced-aa4d-ce3ae332c6cb","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-960,-512],"parameters":{"width":384,"height":656,"content":"## 🛒 D2C Supply Chain Brain Overview\n\nThis workflow runs your inventory on autopilot. \nIt pulls product data daily, tracks how fast things \nare selling, flags what's about to run out, raises \npurchase orders automatically, and sends you a \nweekly report on dead stock — all without you \ntouching anything.\n\n### HOW IT WORKS\n\nEvery morning at 8AM, it fetches product data and \nsimulates daily sales. Then it calculates stock \nhealth per SKU and emails you if something needs \nattention. Stockout? PO goes to supplier automatically. \nDead stock sitting around? GPT tells you what to do \nwith it. Every Sunday you also get a 30-day demand \nforecast so you're always buying ahead, not behind.\n\n### SETUP STEPS\n\n1. Copy the Google Sheet template and paste your \n   Sheet ID in all Google Sheets nodes\n2. Add your Gmail OAuth2 credentials\n3. Add your OpenAI API key\n4. Replace your_email_id with your email\n"},"typeVersion":1},{"id":"acc64139-6caf-4a61-b456-975626daae91","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-128,-176],"parameters":{"color":7,"width":1168,"height":304,"content":"Runs daily at 8AM. Pulls 20 products from  DummyJSON, simulates daily sales, and writes  everything into Inventory Master and Sales Log.  This feeds all other sub-workflows."},"typeVersion":1},{"id":"78a3f77b-9824-4d67-9d47-c42ba21ab8ce","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-144,208],"parameters":{"color":7,"width":2000,"height":464,"content":"Runs at 8:05AM daily. Reads last 7 days of sales,  calculates velocity per SKU, flags each one as  🔴 🟡 or 🟢, updates the sheet, and fires  email alerts if action is needed."},"typeVersion":1},{"id":"c9d24c85-2585-4c63-8b53-596d255a6342","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-112,752],"parameters":{"color":7,"width":2000,"height":304,"content":"Runs at 8:10AM daily. Picks up 🔴 SKUs from the  sheet, calculates reorder quantity using lead time  and buffer stock formula, emails the supplier a PO,  and logs it in PO Tracker automatically"},"typeVersion":1},{"id":"b291e85a-24b6-4cc3-a660-31824e33503c","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-96,1120],"parameters":{"color":7,"width":2144,"height":272,"content":"Runs every Sunday at 9AM. Sends all 🟡 SKUs to  GPT-4o and gets back actionable recommendations —  bundle, discount, or kill. Delivered as a clean  digest email grouped by urgency."},"typeVersion":1},{"id":"985030d5-eaa8-4123-8ad2-c1bcab4b7cc2","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-112,1488],"parameters":{"color":7,"width":2416,"height":352,"content":"Runs every Sunday at 9:30AM. Aggregates last 90  days of sales per SKU, sends it to GPT-4o with  seasonal context, and emails a 30-day forecast  showing exactly what to reorder before you run out."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"9e4b2752-9942-4688-b171-972bac35f9d2","connections":{"Read Sales Log":{"main":[[{"node":"Calculate Velocity & Flags","type":"main","index":0}]]},"Read sales log":{"main":[[{"node":"Read Inventory Master3","type":"main","index":0}]]},"Build GPT Prompt":{"main":[[{"node":"Inventory Strategist","type":"main","index":0}]]},"IF Stockout Risk":{"main":[[{"node":"Alert — Stockout Risk","type":"main","index":0}],[{"node":"IF Dead or Overstock","type":"main","index":0}]]},"Log to Sales Log":{"main":[[{"node":"Write to Inventory Master","type":"main","index":0}]]},"Demand Forecaster":{"main":[[{"node":"Parse Forecast Response","type":"main","index":0}]]},"Log PO to Tracker":{"main":[[{"node":"Notify — PO Raised","type":"main","index":0}]]},"Send PO to Supplier":{"main":[[{"node":"Log PO to Tracker","type":"main","index":0}]]},"Alert — Dead Stock":{"main":[[{"node":"Update Flags (Dead Stock)","type":"main","index":0}]]},"Build Forecast Email":{"main":[[{"node":"Send Forecast Report","type":"main","index":0}]]},"Daily 8:05AM Trigger":{"main":[[{"node":"Read Inventory Master","type":"main","index":0}]]},"Daily 8:10AM Trigger":{"main":[[{"node":"Read Inventory Master1","type":"main","index":0}]]},"Filter Stockout SKUs":{"main":[[{"node":"Calculate Reorder Quantity","type":"main","index":0}]]},"IF Dead or Overstock":{"main":[[{"node":"Alert — Dead Stock","type":"main","index":0}]]},"Inventory Strategist":{"main":[[{"node":"Parse AI Recommendations","type":"main","index":0}]]},"Simulate Daily Sales":{"main":[[{"node":"Log to Sales Log","type":"main","index":0}]]},"Build Forecast Prompt":{"main":[[{"node":"Demand Forecaster","type":"main","index":0}]]},"Read Inventory Master":{"main":[[{"node":"Read Sales Log","type":"main","index":0}]]},"Aggregate 90 Day Sales":{"main":[[{"node":"Build Forecast Prompt","type":"main","index":0}]]},"Filter Actionable SKUs":{"main":[[{"node":"Build Forecast Email","type":"main","index":0}]]},"Read Inventory Master1":{"main":[[{"node":"Filter Stockout SKUs","type":"main","index":0}]]},"Read Inventory Master2":{"main":[[{"node":"Filter Dead & Overstock SKUs","type":"main","index":0}]]},"Read Inventory Master3":{"main":[[{"node":"Aggregate 90 Day Sales","type":"main","index":0}]]},"🕐 Daily 8AM Trigger":{"main":[[{"node":"Fetch Products (DummyJSON)","type":"main","index":0}]]},"Alert — Stockout Risk":{"main":[[{"node":"Update Flags (Stockout)","type":"main","index":0}]]},"Parse Forecast Response":{"main":[[{"node":"Filter Actionable SKUs","type":"main","index":0}]]},"Skip Zero-Velocity SKUs":{"main":[[{"node":"Send PO to Supplier","type":"main","index":0}]]},"Parse AI Recommendations":{"main":[[{"node":"Build Weekly Digest Email","type":"main","index":0}]]},"Build Weekly Digest Email":{"main":[[{"node":"Send Weekly Digest","type":"main","index":0}]]},"Weekly Sunday 9AM Trigger":{"main":[[{"node":"Read Inventory Master2","type":"main","index":0}]]},"Calculate Reorder Quantity":{"main":[[{"node":"Skip Zero-Velocity SKUs","type":"main","index":0}]]},"Calculate Velocity & Flags":{"main":[[{"node":"IF Stockout Risk","type":"main","index":0}]]},"Fetch Products (DummyJSON)":{"main":[[{"node":"Simulate Daily Sales","type":"main","index":0}]]},"Filter Dead & Overstock SKUs":{"main":[[{"node":"Build GPT Prompt","type":"main","index":0}]]},"Weekly Sunday 9:30AM Trigger":{"main":[[{"node":"Read sales log","type":"main","index":0}]]}}},"lastUpdatedBy":1,"workflowInfo":{"nodeCount":47,"nodeTypes":{"n8n-nodes-base.if":{"count":4},"n8n-nodes-base.code":{"count":10},"n8n-nodes-base.gmail":{"count":6},"n8n-nodes-base.filter":{"count":2},"n8n-nodes-base.stickyNote":{"count":6},"n8n-nodes-base.httpRequest":{"count":1},"n8n-nodes-base.googleSheets":{"count":11},"n8n-nodes-base.scheduleTrigger":{"count":5},"@n8n/n8n-nodes-langchain.openAi":{"count":2}}},"status":"published","readyToDemo":null,"user":{"name":"Rahul Joshi","username":"rahul08","bio":"Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.\n\n","verified":true,"links":["https://www.linkedin.com/in/callrahul/"],"avatar":"https://gravatar.com/avatar/b6cf57822463143589b36ada06fbf6cb1509223a740fae3160b28f1ce41ccc12?r=pg&d=retro&size=200"},"nodes":[{"id":18,"icon":"file:googleSheets.svg","name":"n8n-nodes-base.googleSheets","codex":{"data":{"alias":["CSV","Sheet","Spreadsheet","GS"],"resources":{"generic":[{"url":"https://n8n.io/blog/love-at-first-sight-ricardos-n8n-journey/","icon":"❤️","label":"Love at first sight: Ricardo’s n8n journey"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/creating-triggers-for-n8n-workflows-using-polling/","icon":"⏲","label":"Creating triggers for n8n workflows using polling"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/","icon":"📈","label":"Migrating Community Metrics to Orbit using n8n"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/how-honest-burgers-use-automation-to-save-100k-per-year/","icon":"🍔","label":"How Honest Burgers Use Automation to Save $100k per year"},{"url":"https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/","icon":"💻","label":"How a digital strategist uses n8n for online marketing"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Data & Storage","Productivity"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"input\",\"output\"]","defaults":{"name":"Google Sheets"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGZpbGw9IiMyOEI0NDYiIGQ9Ik0zNS42OSAxIDUyIDE3LjIyNXYzOS4wODdhMy42NyAzLjY3IDAgMCAxLTEuMDg0IDIuNjFBMy43IDMuNyAwIDAgMSA0OC4yOTMgNjBIMTIuNzA3YTMuNyAzLjcgMCAwIDEtMi42MjMtMS4wNzhBMy42NyAzLjY3IDAgMCAxIDkgNTYuMzEyVjQuNjg4YTMuNjcgMy42NyAwIDAgMSAxLjA4NC0yLjYxQTMuNyAzLjcgMCAwIDEgMTIuNzA3IDF6Ii8+PHBhdGggZmlsbD0iIzZBQ0U3QyIgZD0iTTM1LjY5IDEgNTIgMTcuMjI1SDM5LjM5N2MtMi4wNTQgMC0zLjcwNy0xLjgyOS0zLjcwNy0zLjg3MnoiLz48cGF0aCBmaWxsPSIjMjE5QjM4IiBkPSJNMzkuMjExIDE3LjIyNSA1MiAyMi40OHYtNS4yNTV6Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTIwLjEyIDMxLjk3NWMwLS44MTcuNjYyLTEuNDc1IDEuNDgzLTEuNDc1aDE3Ljc5NGMuODIxIDAgMS40ODIuNjU4IDEuNDgyIDEuNDc1djE1LjQ4N2MwIC44MTgtLjY2MSAxLjQ3NS0xLjQ4MiAxLjQ3NUgyMS42MDNhMS40NzYgMS40NzYgMCAwIDEtMS40ODIt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2Mi4yMTNoLTYuNjcyem0wIDUuMTYzaDYuNjcydjIuMjEyaC02LjY3MnptOS42MzgtMTAuMzI1aDYuNjcydjIuMjEyaC02LjY3MnptMCA1LjE2Mmg2LjY3MnYyLjIxM2gtNi42NzJ6bTAgNS4xNjNoNi42NzJ2Mi4yMTJoLTYuNjcyeiIvPjwvZz48L3N2Zz4="},"displayName":"Google Sheets","typeVersion":5,"nodeCategories":[{"id":3,"name":"Data & Storage"},{"id":4,"name":"Productivity"}]},{"id":19,"icon":"file:httprequest.svg","name":"n8n-nodes-base.httpRequest","codex":{"data":{"alias":["API","Request","URL","Build","cURL"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-pulling-and-visualizing-data-with-n8n/","icon":"📈","label":"Automatically pulling and visualizing data with n8n"},{"url":"https://n8n.io/blog/learn-how-to-automatically-cross-post-your-content-with-n8n/","icon":"✍️","label":"Learn how to automatically cross-post your content with n8n"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/running-n8n-on-ships-an-interview-with-maranics/","icon":"🛳","label":"Running n8n on ships: An interview with Maranics"},{"url":"https://n8n.io/blog/what-are-apis-how-to-use-them-with-no-code/","icon":" 🪢","label":"What are APIs and how to use them with no code"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/world-poetry-day-workflow/","icon":"📜","label":"Celebrating World Poetry Day with a daily poem in Telegram"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automate-designs-with-bannerbear-and-n8n/","icon":"🎨","label":"Automate Designs with Bannerbear and n8n"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/building-an-expense-tracking-app-in-10-minutes/","icon":"📱","label":"Building an expense tracking app in 10 minutes"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/how-to-use-the-http-request-node-the-swiss-army-knife-for-workflow-automation/","icon":"🧰","label":"How to use the HTTP Request Node - The Swiss Army Knife for Workflow Automation"},{"url":"https://n8n.io/blog/learn-how-to-use-webhooks-with-mattermost-slash-commands/","icon":"🦄","label":"Learn how to use webhooks with Mattermost slash commands"},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/a-low-code-bitcoin-ticker-built-with-questdb-and-n8n-io/","icon":"📈","label":"A low-code bitcoin ticker built with QuestDB and n8n.io"},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/automations-for-activists/","icon":"✨","label":"How Common Knowledge use workflow automation for activism"},{"url":"https://n8n.io/blog/creating-scheduled-text-affirmations-with-n8n/","icon":"🤟","label":"Creating scheduled text affirmations with n8n"},{"url":"https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/","icon":"🛵","label":"How Goomer automated their operations with over 200 n8n workflows"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"output\"]","defaults":{"name":"HTTP Request","color":"#0004F5"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00MCAyMEM0MCA4Ljk1MzE0IDMxLjA0NjkgMCAyMCAwQzguOTUzMTQgMCAwIDguOTUzMTQgMCAyMEMwIDMxLjA0NjkgOC45NTMxNCA0MCAyMCA0MEMzMS4wNDY5IDQwIDQwIDMxLjA0NjkgNDAgMjBaTTIwIDM2Ljk0NThDMTguODg1MiAzNi45NDU4IDE3LjEzNzggMzUuOTY3IDE1LjQ5OTggMzIuNjk4NUMxNC43OTY0IDMxLjI5MTggMTQuMTk2MSAyOS41NDMxIDEzLjc1MjYgMjcuNjg0N0gyNi4xODk4QzI1LjgwNDUgMjkuNTQwMyAyNS4yMDQ0IDMxLjI5MDEgMjQuNTAwMiAzMi42OTg1QzIyLjg2MjIgMzUuOTY3IDIxLjExNDggMzYuOTQ1OCAyMCAzNi45NDU4Wk0xMi45MDY0IDIwQzEyLjkwNjQgMjEuNjA5NyAxMy4wMDg3IDIzLjE2NCAxMy4yMDAzIDI0LjYzMDVIMjYuNzk5N0MyNi45OTEzIDIzLjE2NCAyNy4wOTM2IDIxLjYwOTcgMjcuMDkzNiAyMEMyNy4wOTM2IDE4LjM5MDMgMjYuOTkxMyAxNi44MzYgMjYuNzk5NyAxNS4zNjk1SDEzLjIwMDNDMTMuMDA4NyAxNi44MzYgMTIuOTA2NCAxOC4zO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DE4LjQwNTcgOS45NDYxOSAxNi44NTggMTAuMTIxNyAxNS4zNjk1SDMuNjk0ODRDMy4yNzc0MyAxNi44NDI1IDMuMDU0MTkgMTguMzk3IDMuMDU0MTkgMjBaTTI2LjI3NjYgMzUuNzQyN0MyNy42MzY1IDMzLjYzOTMgMjguNzExIDMwLjg2OCAyOS4zNzc0IDI3LjY4NDdIMzUuMTA0NkMzMy4yNTEgMzEuMzMyMiAzMC4xMDY4IDM0LjIxNzkgMjYuMjc2NiAzNS43NDI3Wk0xMy43MjM0IDM1Ljc0MjdDOS44OTM2OSAzNC4yMTc5IDYuNzUxNTUgMzEuMzMyNCA0Ljg5MjkzIDI3LjY4NDdIMTAuNjIyNkMxMS4yODkgMzAuODY4IDEyLjM2MzUgMzMuNjM5MyAxMy43MjM0IDM1Ljc0MjdaIiBmaWxsPSIjM0E0MkU5Ii8+Cjwvc3ZnPgo="},"displayName":"HTTP Request","typeVersion":4,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","codex":{"data":{"alias":["Router","Filter","Condition","Logic","Boolean","Branch"],"details":"The IF node can be used to implement binary conditional logic in your workflow. You can set up one-to-many conditions to evaluate each item of data being inputted into the node. That data will either evaluate to TRUE or FALSE and route out of the node accordingly.\n\nThis node has multiple types of conditions: Bool, String, Number, and Date & Time.","resources":{"generic":[{"url":"https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/","icon":"🏭","label":"Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"},{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/","icon":"🤬","label":"Create a toxic language detector for Telegram in 4 step"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/","icon":"⚙️","label":"Automate your data processing pipeline in 9 steps"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/","icon":"🏷️","label":"How to automatically manage contributions to open-source projects"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.if/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"transform\"]","defaults":{"name":"If","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"displayName":"If","typeVersion":2,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":356,"icon":"file:gmail.svg","name":"n8n-nodes-base.gmail","codex":{"data":{"alias":["email","human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/using-automation-to-boost-productivity-in-the-workplace/","icon":"💪","label":"Using Automation to Boost Productivity in the Workplace"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Communication","HITL"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"transform\"]","defaults":{"name":"Gmail"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMTkzIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZmlsbD0iIzQyODVGNCIgZD0iTTU4LjE4MiAxOTIuMDVWOTMuMTRMMjcuNTA3IDY1LjA3NyAwIDQ5LjUwNHYxMjUuMDkxYzAgOS42NTggNy44MjUgMTcuNDU1IDE3LjQ1NSAxNy40NTV6Ii8+PHBhdGggZmlsbD0iIzM0QTg1MyIgZD0iTTE5Ny44MTggMTkyLjA1aDQwLjcyN2M5LjY1OSAwIDE3LjQ1NS03LjgyNiAxNy40NTUtMTcuNDU1VjQ5LjUwNWwtMzEuMTU2IDE3LjgzNy0yNy4wMjYgMjUuNzk4eiIvPjxwYXRoIGZpbGw9IiNFQTQzMzUiIGQ9Im01OC4xODIgOTMuMTQtNC4xNzQtMzguNjQ3IDQuMTc0LTM2Ljk4OUwxMjggNjkuODY4bDY5LjgxOC01Mi4zNjQgNC42NyAzNC45OTItNC42NyA0MC42NDRMMTI4IDE0NS41MDR6Ii8+PHBhdGggZmlsbD0iI0ZCQkMwNCIgZD0iTTE5Ny44MTggMTcuNTA0VjkzLjE0TDI1NiA0OS41MDRWMjYuMjMxYzAtMjEuNTg1LTI0LjY0LTMzLjg5LTQxLjg5LTIwLjk0NXoiLz48cGF0aCBmaWxsPSIjQzUyMjFGIiBkPSJtMCA0OS41MDQgMjYuNzU5IDIwLjA3TDU4LjE4MiA5My4xNFYxNy41MDRMNDEuODkgNS4yODZDMjQuNjEtNy42NiAwIDQuNjQ2IDAgMjYuMjN6Ii8+PC9zdmc+"},"displayName":"Gmail","typeVersion":2,"nodeCategories":[{"id":6,"name":"Communication"},{"id":28,"name":"HITL"}]},{"id":565,"icon":"fa:sticky-note","name":"n8n-nodes-base.stickyNote","codex":{"data":{"alias":["Comments","Notes","Sticky"],"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"input\"]","defaults":{"name":"Sticky Note","color":"#FFD233"},"iconData":{"icon":"sticky-note","type":"icon"},"displayName":"Sticky Note","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":834,"icon":"file:code.svg","name":"n8n-nodes-base.code","codex":{"data":{"alias":["cpde","Javascript","JS","Python","Script","Custom Code","Function"],"details":"The Code node allows you to execute JavaScript in your workflow.","resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Code"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAuMjgzIDM1LjgxNzIgOTAuMjgzIDgwVjE3NkM5MC4yODMgMjA2LjkyOCA2NS4yMTA5IDIzMiAzNC4yODMgMjMySDIzQzE2LjM3MjYgMjMyIDExIDIzNy4zNzIgMTEgMjQ0VjI2OEMxMSAyNzQuNjI3IDE2LjM3MjQgMjgwIDIyLjk5OTYgMjgwTDM0LjI4MyAyODBDNjUuMjEwOSAyODAgOTAuMjgzID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E4MyA0MjIuOTc4IDQzMlYzMzZDNDIyLjk3OCAzMDUuMDcyIDQ0OC4wNTEgMjgwIDQ3OC45NzkgMjgwSDQ5MEM0OTYuNjI3IDI4MCA1MDIgMjc0LjYyOCA1MDIgMjY4VjI0NEM1MDIgMjM3LjM3MyA0OTYuNjI4IDIzMiA0OTAgMjMyTDQ3OC45NzkgMjMyQzQ0OC4wNTEgMjMyIDQyMi45NzggMjA2LjkyOCA0MjIuOTc4IDE3NlY4MEM0MjIuOTc4IDM1LjgxNzIgMzg3LjE2MSAwIDM0Mi45NzkgMEgzMTdDMzEwLjM3MyAwIDMwNSA1LjM3MjU4IDMwNSAxMlYzNloiIGZpbGw9IiNGRjk5MjIiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Code","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":839,"icon":"fa:clock","name":"n8n-nodes-base.scheduleTrigger","codex":{"data":{"alias":["Time","Scheduler","Polling","Cron","Interval"],"resources":{"generic":[],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"trigger\",\"schedule\"]","defaults":{"name":"Schedule Trigger","color":"#31C49F"},"iconData":{"icon":"clock","type":"icon"},"displayName":"Schedule Trigger","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":844,"icon":"fa:filter","name":"n8n-nodes-base.filter","codex":{"data":{"alias":["Router","Filter","Condition","Logic","Boolean","Branch"],"details":"The Filter node can be used to filter items based on a condition. If the condition is met, the item will be passed on to the next node. If the condition is not met, the item will be omitted. Conditions can be combined together by AND(meet all conditions), or OR(meet at least one condition).","resources":{"generic":[],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.filter/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Filter","color":"#229eff"},"iconData":{"icon":"filter","type":"icon"},"displayName":"Filter","typeVersion":2,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":1250,"icon":"file:openAi.svg","name":"@n8n/n8n-nodes-langchain.openAi","codex":{"data":{"alias":["LangChain","ChatGPT","Sora","DallE","whisper","audio","transcribe","tts","assistant"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Agents","Miscellaneous","Root Nodes"]}}},"group":"[\"transform\"]","defaults":{"name":"OpenAI"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTM2Ljg2NzEgMTYuMzcxOEMzNy43NzQ2IDEzLjY0OCAzNy40NjIxIDEwLjY2NDIgMzYuMDEwOCA4LjE4NjYxQzMzLjgyODIgNC4zODY1MyAyOS40NDA3IDIuNDMxNDkgMjUuMTU1NiAzLjM1MTUxQzIzLjI0OTMgMS4yMDM5NiAyMC41MTA1IC0wLjAxNzMxNDggMTcuNjM5MiAwLjAwMDE4NTUzM0MxMy4yNTkxIC0wLjAwOTgxNDY4IDkuMzcyNzMgMi44MTAyNSA4LjAyNTIgNi45Nzc4M0M1LjIxMTM5IDcuNTU0MSAyLjc4MjU4IDkuMzE1MzggMS4zNjEzIDEx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"},{"id":26,"name":"Langchain"}]}],"categories":[{"id":39,"name":"CRM"},{"id":49,"name":"AI Summarization"}],"image":[]}}