{
  "name": "Generate AI inventory reorder recommendations from Airtable with GPT-4o, Slack and email",
  "nodes": [
    {
      "id": "037cd3b0-2a18-4c98-8e92-e75d8f3d0a4e",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2144,
        688
      ]
    },
    {
      "id": "7121f040-e567-4d0b-9dba-f8dcaa520b5d",
      "name": "Configure GPT-4o Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        64,
        1712
      ]
    },
    {
      "id": "cd5f5266-7db1-428c-9710-9dce2b429e3a",
      "name": "Configure GPT-4o Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        0,
        944
      ]
    },
    {
      "id": "00f12801-52b7-42f7-97f1-c98c5c250dfc",
      "name": "Fetch Inventory Records from Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -1888,
        688
      ]
    },
    {
      "id": "0566f579-12d6-4481-8f1d-91b4e7830410",
      "name": "Validate Inventory Record Structure",
      "type": "n8n-nodes-base.if",
      "position": [
        -1648,
        688
      ]
    },
    {
      "id": "33ca7f8d-04ad-4a26-92ee-8e1b4aab8505",
      "name": "Log Invalid Inventory Rows to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1520,
        960
      ]
    },
    {
      "id": "58ec936e-5e82-46dc-8c1f-9f05c18d5064",
      "name": "Configure GPT-4o — Inventory Optimization Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        -1184,
        1040
      ]
    },
    {
      "id": "83728f9e-386c-42db-9dcf-4fb6a95363a9",
      "name": "Generate Inventory Optimization Output (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1184,
        672
      ]
    },
    {
      "id": "6fee56e2-5f56-4eb0-8aeb-ea5eec3b9966",
      "name": "Merge AI Optimization Results ",
      "type": "n8n-nodes-base.code",
      "position": [
        -768,
        672
      ]
    },
    {
      "id": "e135ec50-ebdd-46b1-8ce6-3f7efd5aa96b",
      "name": "Generate Inventory Email Summary ",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        64,
        1408
      ]
    },
    {
      "id": "dc2b5093-f528-484f-938d-a1edec8b6683",
      "name": "Generate Inventory Slack Summary",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        0,
        608
      ]
    },
    {
      "id": "ad89daec-5eb0-440c-a920-f38c71118521",
      "name": "Notify Operations Team on Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        432,
        608
      ]
    },
    {
      "id": "71fd0164-d326-495e-9142-3ff2108e6c50",
      "name": "Email Inventory Summary to Manager",
      "type": "n8n-nodes-base.gmail",
      "position": [
        448,
        1408
      ]
    },
    {
      "id": "6a917416-e1cd-482d-b553-039bd9184f76",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2720,
        -368
      ],
      "parameters": {
        "width": 816,
        "height": 576,
        "content": "## 📦 Automate Inventory Reordering from Airtable using GPT-4o, Slack & Email\nThis workflow automates inventory intelligence using Airtable + AI models to generate \noptimized stock metrics, and deliver"
      }
    },
    {
      "id": "497c6ee4-b792-49b4-a140-879d68ca54c5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1952,
        464
      ],
      "parameters": {
        "width": 656,
        "height": 688,
        "content": "## Intake & Validation Block\n\nThis section handles data import and quality checks:\n• Pulls inventory from Airtable  \n• Validates required fields (id)  \n• Routes invalid rows to Google Sheets for audit"
      }
    },
    {
      "id": "c5c932d7-205e-4551-b3ee-ea1ff00930de",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        384
      ],
      "parameters": {
        "width": 688,
        "height": 800,
        "content": "## AI Optimization Engine\n\nThis block processes inventory rows using GPT-4o:\n• Applies fixed formulas for reorder point & safety stock  \n• Computes stock health status  \n• Ensures strict JSON output ("
      }
    },
    {
      "id": "a360b40d-47a6-4531-8482-b3dacbd6654b",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1216
      ],
      "parameters": {
        "width": 640,
        "height": 672,
        "content": "## Email Summary Generation\n\nCreates a professional, actionable inventory report:\n• Overall stock health  \n• Low/critical SKU alerts  \n• Recommended next steps  \n• Delivered via Gmail to the manager  "
      }
    },
    {
      "id": "9148fded-83db-4b92-824f-926f518ff4de",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        400
      ],
      "parameters": {
        "width": 720,
        "height": 688,
        "content": "## Slack Summary Generation\n\nProduces a compact, emoji-friendly inventory status message:\n• One-line health indicator  \n• Item-wise stock highlights  \n• Critical/reorder alerts (🟢 ⚠️ 🔴)  \n• Auto-sent "
      }
    },
    {
      "id": "292c5f1c-9082-438e-9d15-3f6c39e12a5a",
      "name": "Workflow Error Handler",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -1888,
        1552
      ]
    },
    {
      "id": "41c63b59-052a-4014-803a-9a5b6d0eb043",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -1536,
        1552
      ]
    },
    {
      "id": "4f3d6a6f-a41d-49ed-b253-782ae348d8ef",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1968,
        1392
      ],
      "parameters": {
        "width": 672,
        "height": 336,
        "content": "## Error Handling\nSends alerts when the workflow fails\n"
      }
    },
    {
      "id": "3db10acf-1c31-43d5-8dbf-5d5f63a1dea9",
      "name": "Log Trade Decision to Notion (inventory db)",
      "type": "n8n-nodes-base.notion",
      "position": [
        -64,
        -176
      ]
    },
    {
      "id": "1efc26f4-8b24-4d10-a68e-278211042301",
      "name": "Create Asana Task for Inventory Db",
      "type": "n8n-nodes-base.asana",
      "position": [
        208,
        -80
      ]
    },
    {
      "id": "231ddfbe-f4a2-4c28-8ef4-16753de41def",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        704
      ],
      "parameters": {
        "width": 336,
        "height": 272,
        "content": "## 🔐 Required Credentials\n- Airtable (Inventory source)\n- Azure OpenAI (GPT-4o)\n- Google Sheets (audit logging)\n- Slack API (Ops alerts)\n- Gmail OAuth2 (email summaries)\n- Notion API (inventory record"
      }
    },
    {
      "id": "f471c407-abc4-4048-b482-c994baa3d4df",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -432
      ],
      "parameters": {
        "width": 576,
        "height": 576,
        "content": "## 🗂️ Task & Record Logging\nLogs inventory decisions for traceability and action.\nCreates tasks in Asana and stores optimized records\ninside a Notion inventory database.\n"
      }
    }
  ],
  "connections": {
    "Configure GPT-4o Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Inventory Email Summary ",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Error Handler": {
      "main": [
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure GPT-4o Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Inventory Slack Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge AI Optimization Results ": {
      "main": [
        [
          {
            "node": "Generate Inventory Email Summary ",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Inventory Slack Summary",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create Asana Task for Inventory Db",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log Trade Decision to Notion (inventory db)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Inventory Slack Summary": {
      "main": [
        [
          {
            "node": "Notify Operations Team on Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Inventory Email Summary ": {
      "main": [
        [
          {
            "node": "Email Inventory Summary to Manager",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Inventory Record Structure": {
      "main": [
        [
          {
            "node": "Generate Inventory Optimization Output (AI)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Invalid Inventory Rows to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Fetch Inventory Records from Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Inventory Records from Airtable": {
      "main": [
        [
          {
            "node": "Validate Inventory Record Structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Inventory Optimization Output (AI)": {
      "main": [
        [
          {
            "node": "Merge AI Optimization Results ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure GPT-4o — Inventory Optimization Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Inventory Optimization Output (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}