{
  "name": "Inventory reconciliation between Notion & Airtable with GPT-4o Slack alerts",
  "nodes": [
    {
      "id": "00cc9d36-8dd3-4171-921d-350058ef05b9",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1360,
        80
      ]
    },
    {
      "id": "849eb97d-f8c5-413f-b70e-53cd51a5b90c",
      "name": "Configure GPT-4o – Slack Summary Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1440,
        448
      ]
    },
    {
      "id": "273fc1a9-4d6d-48d5-b5a3-a114740555f9",
      "name": "Log Invalid Versioning Requests to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        464
      ]
    },
    {
      "id": "db842a83-9e27-4c77-b87e-2ed44054aec5",
      "name": "Fetch Records from Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -976,
        208
      ]
    },
    {
      "id": "735cb478-2746-40db-8230-c8cf178fb675",
      "name": "Fetch Records from Notion Database",
      "type": "n8n-nodes-base.notion",
      "position": [
        -976,
        -48
      ]
    },
    {
      "id": "3c09cacf-28e8-49a9-8221-0b5679ef1b3f",
      "name": "Merge Notion + Airtable Inputs",
      "type": "n8n-nodes-base.merge",
      "position": [
        -560,
        64
      ]
    },
    {
      "id": "8ec9d617-34b9-46f1-bb98-67f7b768d81e",
      "name": "Build Combined Notion + Airtable Payload",
      "type": "n8n-nodes-base.code",
      "position": [
        192,
        48
      ]
    },
    {
      "id": "b1a5772d-e0df-451e-821b-07bcd403eed1",
      "name": "Compare Notion Record With Airtable Record",
      "type": "n8n-nodes-base.code",
      "position": [
        464,
        48
      ]
    },
    {
      "id": "e8f1ce9d-77b4-49dd-9664-2d3269d86bfc",
      "name": "Check If Record Requires Update",
      "type": "n8n-nodes-base.if",
      "position": [
        672,
        48
      ]
    },
    {
      "id": "1957c8d2-dccf-4b4d-b0e1-93133781aaea",
      "name": "Generate Slack Summary",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1440,
        240
      ]
    },
    {
      "id": "25cbfe5c-b0ba-4251-b7dd-a111b53050b0",
      "name": "Slack – Send Summary Notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        1872,
        240
      ]
    },
    {
      "id": "b5744459-52d9-460a-9007-b60bf9903501",
      "name": "Update Airtable Record With Corrected Count",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1024,
        -672
      ]
    },
    {
      "id": "9d4d02c6-222b-45f4-a751-0e91f4835312",
      "name": "Configure GPT-4o – Slack Summary Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1408,
        -64
      ]
    },
    {
      "id": "351bfd10-098a-4725-8681-be8f919c8ed1",
      "name": "Generate Slack Summary1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1408,
        -272
      ]
    },
    {
      "id": "b4440e05-3ae3-42fe-9009-cd8fb59976be",
      "name": "Slack – Send Update Notification",
      "type": "n8n-nodes-base.slack",
      "position": [
        1840,
        -272
      ]
    },
    {
      "id": "fd724c3b-7ec0-40c7-b887-425bf85eb9a4",
      "name": "Validate Payload Structure",
      "type": "n8n-nodes-base.if",
      "position": [
        -208,
        64
      ]
    },
    {
      "id": "7f9e744f-e1a8-4a7f-8708-23c19c7ba303",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2208,
        -1056
      ],
      "parameters": {
        "width": 848,
        "height": 592,
        "content": "## 🔄 Notion & Airtable Stock Sync Validator with AI Slack Notifications\n\nThis workflow compares item-wise inventory counts between Notion (physical count) and \nAirtable (system count) to ensure accura"
      }
    },
    {
      "id": "624f8ae8-a231-4ced-a048-fabd947e78be",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1184,
        -192
      ],
      "parameters": {
        "width": 1328,
        "height": 832,
        "content": "## Data Intake & Merge — Notion + Airtable\nFetches physical count from Notion and system count from Airtable.\nMerges both datasets into a single comparison-ready payload.\nInvalid or incomplete structu"
      }
    },
    {
      "id": "201e9850-99b9-4064-9550-89bec0361702",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -160
      ],
      "parameters": {
        "width": 672,
        "height": 560,
        "content": "## Reconciliation Logic — Count Comparison\nCompares physical stock from Notion with system stock from Airtable.\nDetects mismatches, calculates the difference, and determines if a record requires corre"
      }
    },
    {
      "id": "8f616b82-d05b-42f3-9d24-612c6e7c8978",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        -928
      ],
      "parameters": {
        "width": 288,
        "height": 464,
        "content": "## System Update — Fixing Airtable Record\nWhen discrepancies are detected, updates the Airtable record with the corrected physical count.\nEnsures the system-of-record stays accurate for reporting and "
      }
    },
    {
      "id": "7e9051c3-67ab-4052-90ff-9c3964339ef6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        -416
      ],
      "parameters": {
        "width": 912,
        "height": 1008,
        "content": "## Notification Engine — AI Slack Messaging\nUses GPT-4o to generate short, clear Slack messages for inventory reconciliation.\nIf no update needed → sends a “counts match” summary.  \nIf Airtable update"
      }
    }
  ],
  "connections": {
    "Generate Slack Summary": {
      "main": [
        [
          {
            "node": "Slack – Send Summary Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Slack Summary1": {
      "main": [
        [
          {
            "node": "Slack – Send Update Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Payload Structure": {
      "main": [
        [
          {
            "node": "Build Combined Notion + Airtable Payload",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Invalid Versioning Requests to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Records from Airtable": {
      "main": [
        [
          {
            "node": "Merge Notion + Airtable Inputs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Notion + Airtable Inputs": {
      "main": [
        [
          {
            "node": "Validate Payload Structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Record Requires Update": {
      "main": [
        [
          {
            "node": "Update Airtable Record With Corrected Count",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Slack Summary1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Slack Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Records from Notion Database": {
      "main": [
        [
          {
            "node": "Merge Notion + Airtable Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Fetch Records from Notion Database",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Records from Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Combined Notion + Airtable Payload": {
      "main": [
        [
          {
            "node": "Compare Notion Record With Airtable Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure GPT-4o – Slack Summary Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Slack Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Configure GPT-4o – Slack Summary Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Slack Summary1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Compare Notion Record With Airtable Record": {
      "main": [
        [
          {
            "node": "Check If Record Requires Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}