{
  "name": "Forecast demand, optimize pricing, and engage customers with GPT‑4.1, Postgres, email, and Slack",
  "nodes": [
    {
      "id": "7fdc5d93-218c-4ad3-863e-9101ff48bc5e",
      "name": "Webhook - Ingest Data",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1824,
        1132
      ]
    },
    {
      "id": "9113fb5a-bacd-44f5-9211-cc61b6583b13",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -1600,
        1132
      ]
    },
    {
      "id": "3258f3f5-55d1-40a3-aa93-669e605d3038",
      "name": "Route by Data Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1376,
        1100
      ]
    },
    {
      "id": "85d21012-c743-416b-9a35-5fa9a2705e3b",
      "name": "Normalize Orders",
      "type": "n8n-nodes-base.set",
      "position": [
        -1152,
        384
      ]
    },
    {
      "id": "be411153-3f10-455b-a05e-9d7ef23124f4",
      "name": "Normalize Reviews",
      "type": "n8n-nodes-base.set",
      "position": [
        -1152,
        984
      ]
    },
    {
      "id": "74c31f34-bec6-43c2-b76a-86d250319229",
      "name": "Normalize Inventory",
      "type": "n8n-nodes-base.set",
      "position": [
        -1152,
        1280
      ]
    },
    {
      "id": "0e2ca03a-fbd9-479f-b92f-76e7f280f7e9",
      "name": "Normalize Social Media",
      "type": "n8n-nodes-base.set",
      "position": [
        -1152,
        1472
      ]
    },
    {
      "id": "93eb893b-6903-43a3-8002-be19d240a591",
      "name": "Validate Orders",
      "type": "n8n-nodes-base.filter",
      "position": [
        -928,
        384
      ]
    },
    {
      "id": "d3394dfa-400a-47aa-9152-708bf770b8fd",
      "name": "Validate Reviews",
      "type": "n8n-nodes-base.filter",
      "position": [
        -928,
        984
      ]
    },
    {
      "id": "264fbc46-7020-43c9-88a5-5e28c8c75a8b",
      "name": "Validate Inventory",
      "type": "n8n-nodes-base.filter",
      "position": [
        -928,
        1280
      ]
    },
    {
      "id": "3d263e0d-bd10-4996-a7aa-c1dc7abc9394",
      "name": "Validate Social Media",
      "type": "n8n-nodes-base.filter",
      "position": [
        -928,
        1472
      ]
    },
    {
      "id": "05d33403-da1f-4c47-9ff5-b79960a7e37d",
      "name": "AI Agent - Sentiment Analysis",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -704,
        880
      ]
    },
    {
      "id": "61cd1314-9b39-4506-80eb-00366c9b1f92",
      "name": "AI Agent - Demand Forecasting",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -704,
        128
      ]
    },
    {
      "id": "22aa936d-eb33-4b5c-b6b6-15aeadde8583",
      "name": "AI Agent - Product Recommendations",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -704,
        480
      ]
    },
    {
      "id": "d69ab9bc-6cc0-46d1-aca4-b9bac2e97f59",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -696,
        304
      ]
    },
    {
      "id": "875ab010-179c-43b9-9f27-d20e3fd11e38",
      "name": "Structured Output - Sentiment",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -632,
        1104
      ]
    },
    {
      "id": "ab3c9a3e-856d-46ee-8d07-0498699d6449",
      "name": "Structured Output - Forecast",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -568,
        304
      ]
    },
    {
      "id": "cb59cf2f-5bb8-4135-892d-9c50a6e65aca",
      "name": "Structured Output - Recommendations",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -632,
        704
      ]
    },
    {
      "id": "92ea6225-686b-4ae9-b1fc-cabb5e47afa7",
      "name": "Apply Pricing Rules",
      "type": "n8n-nodes-base.code",
      "position": [
        80,
        208
      ]
    },
    {
      "id": "01ec4551-0a55-41dc-8bed-9537e2498a4d",
      "name": "Apply Promotion Rules",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        208
      ]
    },
    {
      "id": "d20b248d-1673-4dd7-a2d7-12bf28cd046b",
      "name": "Apply Replenishment Rules",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        208
      ]
    },
    {
      "id": "745fbd00-297b-433b-bea7-f16504a1dbe6",
      "name": "Check for Exceptions",
      "type": "n8n-nodes-base.if",
      "position": [
        752,
        208
      ]
    },
    {
      "id": "b03bb460-1c02-4089-b1ac-009eb6340461",
      "name": "Merge Analysis Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        -368,
        560
      ]
    },
    {
      "id": "45c21d19-bed5-4f6c-a85c-862c0fd8ec8e",
      "name": "Wait for Manual Review",
      "type": "n8n-nodes-base.wait",
      "position": [
        976,
        128
      ]
    },
    {
      "id": "8aff2f23-83a6-4c6c-82ad-5a2755d425bf",
      "name": "Store in CRM Database",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1200,
        208
      ]
    },
    {
      "id": "5bb5f1fe-4015-443c-921f-c12cf35a42e9",
      "name": "Store in Inventory Database",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -640,
        1280
      ]
    },
    {
      "id": "bdd3564a-f903-4ae7-a263-6afab58b2b8b",
      "name": "Notify Supply Chain Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        -432,
        1296
      ]
    },
    {
      "id": "53674ff3-8c07-4a66-b90a-f2afa3823006",
      "name": "Notify Customer Support Team",
      "type": "n8n-nodes-base.slack",
      "position": [
        -640,
        1472
      ]
    },
    {
      "id": "53973b60-c07c-4728-8206-b4d5b96cbb11",
      "name": "Send Email Campaign",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1648,
        208
      ]
    },
    {
      "id": "93bb9492-a6db-4805-9818-8d041f5eb0e7",
      "name": "Prepare Campaign Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1424,
        208
      ]
    },
    {
      "id": "3c704851-32cd-4393-87f1-6ec899f0d238",
      "name": "Remove Duplicate Records",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        -144,
        208
      ]
    },
    {
      "id": "11098ffc-acf5-480c-a0c1-28b2df720d12",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1824,
        -288
      ],
      "parameters": {
        "width": 752,
        "height": 224,
        "content": "## How It Works\nThis workflow automates inventory management and customer engagement for e-commerce businesses and retail operations managing multiple product categories. It solves the critical challe"
      }
    },
    {
      "id": "f9d43e23-e427-4f48-941c-197362a7bbdd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -304
      ],
      "parameters": {
        "width": 496,
        "height": 256,
        "content": "## Setup Steps\n1. Configure webhook URLs for orders, reviews, inventory systems, and social media platforms\n2. Add AI model API credentials (OpenAI/Anthropic) for sentiment, pricing\n3. Connect CRM dat"
      }
    },
    {
      "id": "a9fe5806-bfe7-4fe5-86e1-e62443e98c12",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        -416
      ],
      "parameters": {
        "width": 400,
        "height": 368,
        "content": "## Prerequisites\nActive e-commerce platform with webhook support, AI service API keys\n## Use Cases\nMulti-channel retailers optimizing stock across locations, subscription box services  \n## Customizati"
      }
    },
    {
      "id": "8d0b01bc-faf7-45d6-a4f6-554eb2e8b298",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        0
      ],
      "parameters": {
        "width": 2208,
        "height": 512,
        "content": "## Automated Engagement Distribution\n**Why:** Coordinated delivery through CRM, email campaigns, and team notifications ensures stakeholders receive relevant updates while customers experience persona"
      }
    },
    {
      "id": "56751703-bd02-4237-b685-c8a60276cbe6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        0
      ],
      "parameters": {
        "width": 544,
        "height": 1680,
        "content": "## AI-Powered Intelligence Analysis\n**Why:** Parallel AI agents process data for sentiment analysis, pricing strategy, promotional targeting, and inventory forecasting, transforming raw data into acti"
      }
    },
    {
      "id": "512f5dc0-57ea-43bf-b01c-a11e5b91d829",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1856,
        16
      ],
      "parameters": {
        "width": 1056,
        "height": 1584,
        "content": "## Multi-Channel Data Ingestion\n**Why:** Webhook triggers capture real-time events from orders, reviews, inventory, and social platforms, ensuring immediate response to business-critical changes."
      }
    }
  ],
  "connections": {
    "Validate Orders": {
      "main": [
        [
          {
            "node": "AI Agent - Demand Forecasting",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI Agent - Product Recommendations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Orders": {
      "main": [
        [
          {
            "node": "Validate Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Reviews": {
      "main": [
        [
          {
            "node": "AI Agent - Sentiment Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Reviews": {
      "main": [
        [
          {
            "node": "Validate Reviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Sentiment Analysis",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent - Demand Forecasting",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent - Product Recommendations",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Route by Data Type": {
      "main": [
        [
          {
            "node": "Normalize Orders",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Normalize Reviews",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Normalize Inventory",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Normalize Social Media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Inventory": {
      "main": [
        [
          {
            "node": "Store in Inventory Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Pricing Rules": {
      "main": [
        [
          {
            "node": "Apply Promotion Rules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Inventory": {
      "main": [
        [
          {
            "node": "Validate Inventory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Exceptions": {
      "main": [
        [
          {
            "node": "Wait for Manual Review",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store in CRM Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Promotion Rules": {
      "main": [
        [
          {
            "node": "Apply Replenishment Rules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Campaign Data": {
      "main": [
        [
          {
            "node": "Send Email Campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store in CRM Database": {
      "main": [
        [
          {
            "node": "Prepare Campaign Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Social Media": {
      "main": [
        [
          {
            "node": "Notify Customer Support Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Ingest Data": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Analysis Results": {
      "main": [
        [
          {
            "node": "Remove Duplicate Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Social Media": {
      "main": [
        [
          {
            "node": "Validate Social Media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Manual Review": {
      "main": [
        [
          {
            "node": "Store in CRM Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Route by Data Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicate Records": {
      "main": [
        [
          {
            "node": "Apply Pricing Rules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Replenishment Rules": {
      "main": [
        [
          {
            "node": "Check for Exceptions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store in Inventory Database": {
      "main": [
        [
          {
            "node": "Notify Supply Chain Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output - Forecast": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent - Demand Forecasting",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Demand Forecasting": {
      "main": [
        [
          {
            "node": "Merge Analysis Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "AI Agent - Sentiment Analysis": {
      "main": [
        [
          {
            "node": "Merge Analysis Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output - Sentiment": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent - Sentiment Analysis",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Product Recommendations": {
      "main": [
        [
          {
            "node": "Merge Analysis Results",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Structured Output - Recommendations": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent - Product Recommendations",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}