{
  "name": "Inventory Tracking Automation for Airtable",
  "nodes": [
    {
      "id": "3b061df3-7034-4751-ba11-bcad25805dc3",
      "name": "Requirements Overview Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20912,
        6320
      ],
      "parameters": {
        "width": 720,
        "height": 336,
        "content": "Auto Draft PO: When there's no draft PO left for a supplier, create a new one\n\nAdd Products to Draft PO: When Current Qty changes, if Forecast Qty ≤ Threshold Qty, add Refill Qty - Current Qty to supp"
      }
    },
    {
      "id": "8a217af9-9165-4bfc-9a29-a9c40cc9dbdc",
      "name": "Draft PO Creation Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        6784
      ],
      "parameters": {
        "width": 848,
        "height": 448,
        "content": "## Create a Draft PO if there's none"
      }
    },
    {
      "id": "9f8c0dfe-4256-4724-8803-7c7fb8739b46",
      "name": "PO Modified",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        20576,
        6944
      ]
    },
    {
      "id": "1fe9fdf0-5654-4e9a-9cb4-3844c4e37dd4",
      "name": "Find Suppliers Without Draft PO",
      "type": "n8n-nodes-base.airtable",
      "position": [
        20912,
        6944
      ]
    },
    {
      "id": "a74f3b2a-121f-409d-ad0d-0f63134d60c3",
      "name": "Create a Draft PO",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21136,
        6944
      ]
    },
    {
      "id": "af859cc7-1623-40bc-8792-8e43753449bb",
      "name": "Manual Trigger for Test SO",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        20864,
        8352
      ]
    },
    {
      "id": "f3d2e6c1-8f32-4e98-b036-ada97e303584",
      "name": "List Products",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21280,
        8352
      ]
    },
    {
      "id": "6a801771-6d6d-4369-a893-b311821332ed",
      "name": "Auto Add Products Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        7312
      ],
      "parameters": {
        "width": 1424,
        "height": 416,
        "content": "## Adds Products to Purchase Order Based on Treshold"
      }
    },
    {
      "id": "9b42958a-74e0-452c-8942-1db762230e60",
      "name": "Random SO Generator Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        8208
      ],
      "parameters": {
        "width": 1104,
        "height": 400,
        "content": "## For test - generate random SO\n\n\n"
      }
    },
    {
      "id": "ea92d54d-6ea4-4f33-8641-389c0d70bb8d",
      "name": "Check Products Hourly",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        20576,
        7488
      ]
    },
    {
      "id": "33d3fc8f-a61c-4ce5-b1c1-486f4c618135",
      "name": "Find Products Need Purchase",
      "type": "n8n-nodes-base.airtable",
      "position": [
        20880,
        7488
      ]
    },
    {
      "id": "233d43e1-0b1b-4648-86e9-8a94273e431b",
      "name": "Find Draft PO for Supplier",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21568,
        7472
      ]
    },
    {
      "id": "14681ae3-1ce5-4058-ad09-cb7dcbe2a6e1",
      "name": "Merge Product and Stock In Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        21360,
        7472
      ]
    },
    {
      "id": "e3c1b9a9-b34f-4dd4-8a8b-2c10255859ca",
      "name": "Find Existing Stock In",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21120,
        7376
      ]
    },
    {
      "id": "9095e8ac-4eae-477d-848b-afabc06bea7c",
      "name": "Is there Stock In Already",
      "type": "n8n-nodes-base.if",
      "position": [
        21776,
        7472
      ]
    },
    {
      "id": "aa786ba7-3869-4a4d-86f4-3b1f15099fd7",
      "name": "Update Stock In",
      "type": "n8n-nodes-base.airtable",
      "position": [
        22016,
        7392
      ]
    },
    {
      "id": "c91d8cbe-dcf1-4f5c-af8b-52cb152d50a6",
      "name": "Create Stock In",
      "type": "n8n-nodes-base.airtable",
      "position": [
        22016,
        7552
      ]
    },
    {
      "id": "c26995a5-e7fa-4614-9a61-c3eb39a34d57",
      "name": "PO Enters Needs Email",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        20592,
        7888
      ]
    },
    {
      "id": "8783c720-d3aa-42b8-ac91-5e3568b1d14e",
      "name": "Email Orders Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        7760
      ],
      "parameters": {
        "width": 1424,
        "height": 416,
        "content": "## Sends out order to Suppliers in Email"
      }
    },
    {
      "id": "41b6d1e1-a1b7-4061-a2fe-c0c151b69aa4",
      "name": "Create SO",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21072,
        8352
      ]
    },
    {
      "id": "33386f17-23cc-4feb-ab50-6a05583d0aba",
      "name": "Create SO Line",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21488,
        8352
      ]
    },
    {
      "id": "219498e5-2cfa-4b3b-934d-8f43acfd9656",
      "name": "Send out PO to Supplier",
      "type": "n8n-nodes-base.gmail",
      "position": [
        20832,
        7888
      ]
    },
    {
      "id": "2c3d5986-b6f3-422d-bca2-b2afdd6ab9f3",
      "name": "Update PO Status",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21056,
        7888
      ]
    },
    {
      "id": "2086d3bc-9c99-44b8-8589-5e8b65874fcd",
      "name": "Workflow Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        19872,
        6784
      ],
      "parameters": {
        "width": 600,
        "height": 1108,
        "content": "## Workflow Overview\n\nThis n8n workflow automates the entire purchase order process for an Airtable-based inventory management system. It monitors stock levels, automatically creates purchase orders w"
      }
    },
    {
      "id": "0ad07274-2fa1-4e00-9fbe-c022d8b6c4e4",
      "name": "Creator Contact Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        19872,
        6320
      ],
      "parameters": {
        "width": 600,
        "height": 440,
        "content": "# Contact Us:\n## Milan @ SmoothWork - [Book a Free Consulting Call](https://smoothwork.ai/book-a-call/)\n![Milan](https://gravatar.com/avatar/95700d17ba300a9f14c1b8cacf933df7720027b3adda9cbe6183d891429"
      }
    },
    {
      "id": "d002ffdd-6fdc-4a2e-a386-48698927cac4",
      "name": "Video Walkthrough",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20496,
        6320
      ],
      "parameters": {
        "width": 420,
        "height": 340,
        "content": "# Video Walkthrough\n[![image.png](https://vasarmilan-public.s3.us-east-1.amazonaws.com/blog_thumbnails/thumbnail_recNF7sSjKUzdiAUP.jpg)](https://youtu.be/4CQ3o7qChIs)"
      }
    }
  ],
  "connections": {
    "Create SO": {
      "main": [
        [
          {
            "node": "List Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PO Modified": {
      "main": [
        [
          {
            "node": "Find Suppliers Without Draft PO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Products": {
      "main": [
        [
          {
            "node": "Create SO Line",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Products Hourly": {
      "main": [
        [
          {
            "node": "Find Products Need Purchase",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PO Enters Needs Email": {
      "main": [
        [
          {
            "node": "Send out PO to Supplier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Existing Stock In": {
      "main": [
        [
          {
            "node": "Merge Product and Stock In Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send out PO to Supplier": {
      "main": [
        [
          {
            "node": "Update PO Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is there Stock In Already": {
      "main": [
        [
          {
            "node": "Update Stock In",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Stock In",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Draft PO for Supplier": {
      "main": [
        [
          {
            "node": "Is there Stock In Already",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger for Test SO": {
      "main": [
        [
          {
            "node": "Create SO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Products Need Purchase": {
      "main": [
        [
          {
            "node": "Find Existing Stock In",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Product and Stock In Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Find Suppliers Without Draft PO": {
      "main": [
        [
          {
            "node": "Create a Draft PO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Product and Stock In Data": {
      "main": [
        [
          {
            "node": "Find Draft PO for Supplier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}