AutomationFlowsEmail & Gmail › Inventory Tracking Automation for Airtable

Inventory Tracking Automation for Airtable

ByMilan Vasarhelyi - SmoothWork @vasarmilan on n8n.io

[](https://youtu.be/4CQ3o7qChIs)

Event trigger★★★★☆ complexity26 nodesAirtable TriggerAirtableGmail
Email & Gmail Trigger: Event Nodes: 26 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #11184 — we link there as the canonical source.

This workflow follows the Airtable → Gmail recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "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 \u2264 Threshold Qty, add Refill Qty - Current Qty to supplier-specific draft order (or increase if exists)\n\nSend PO with email: When switching from Draft to Order, generate email text:\n\n  Hi there,\n  I'd like to place the following order:\n  {Product 1} - {Qty}\n  {Product 2} - {Qty}\n(Don't send emails, just generate text)\n\nGenerate random SO (test):\n\nSimulate daily sales by selling random amounts from each product under current available qty. Manual trigger only."
      },
      "typeVersion": 1
    },
    {
      "id": "8a217af9-9165-4bfc-9a29-a9c40cc9dbdc",
      "name": "Draft PO Creation Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        6784
      ],
      "parameters": {
        "color": 6,
        "width": 848,
        "height": 448,
        "content": "## Create a Draft PO if there's none"
      },
      "typeVersion": 1
    },
    {
      "id": "9f8c0dfe-4256-4724-8803-7c7fb8739b46",
      "name": "PO Modified",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        20576,
        6944
      ],
      "parameters": {
        "baseId": {
          "__rl": true,
          "mode": "url",
          "value": "https://airtable.com/appN9ivOwGQt1FwT5/tblaoU05NUR1ZPTLK/viwP97rB9cZ9JBElJ?blocks=hide"
        },
        "tableId": {
          "__rl": true,
          "mode": "url",
          "value": "https://airtable.com/appN9ivOwGQt1FwT5/tblaoU05NUR1ZPTLK/viwP97rB9cZ9JBElJ?blocks=hide"
        },
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerField": "Last Modified",
        "authentication": "airtableTokenApi",
        "additionalFields": {
          "formula": ""
        }
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1fe9fdf0-5654-4e9a-9cb4-3844c4e37dd4",
      "name": "Find Suppliers Without Draft PO",
      "type": "n8n-nodes-base.airtable",
      "position": [
        20912,
        6944
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblW3uRcMObpV06An",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblW3uRcMObpV06An",
          "cachedResultName": "Suppliers"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "{Draft PO Count} = 0"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 2.1
    },
    {
      "id": "a74f3b2a-121f-409d-ad0d-0f63134d60c3",
      "name": "Create a Draft PO",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21136,
        6944
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblaoU05NUR1ZPTLK",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblaoU05NUR1ZPTLK",
          "cachedResultName": "Purchase Orders"
        },
        "columns": {
          "value": {
            "Status": "Draft",
            "Supplier": "=[\"{{ $json.id }}\"]"
          },
          "schema": [
            {
              "id": "PO ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "PO ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email Text",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Email Text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Draft",
                  "value": "Draft"
                },
                {
                  "name": "Order",
                  "value": "Order"
                },
                {
                  "name": "Received",
                  "value": "Received"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Supplier",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Supplier",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email (from Suppliers)",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Email (from Suppliers)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Modified",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last Modified",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Stock In Records",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Stock In Records",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "af859cc7-1623-40bc-8792-8e43753449bb",
      "name": "Manual Trigger for Test SO",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        20864,
        8352
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f3d2e6c1-8f32-4e98-b036-ada97e303584",
      "name": "List Products",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21280,
        8352
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbljPbeJv8V58CZWr",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tbljPbeJv8V58CZWr",
          "cachedResultName": "Products"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "{Current Qty} >= 1"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "6a801771-6d6d-4369-a893-b311821332ed",
      "name": "Auto Add Products Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        7312
      ],
      "parameters": {
        "color": 6,
        "width": 1424,
        "height": 416,
        "content": "## Adds Products to Purchase Order Based on Treshold"
      },
      "typeVersion": 1
    },
    {
      "id": "9b42958a-74e0-452c-8942-1db762230e60",
      "name": "Random SO Generator Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        8208
      ],
      "parameters": {
        "color": 6,
        "width": 1104,
        "height": 400,
        "content": "## For test - generate random SO\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ea92d54d-6ea4-4f33-8641-389c0d70bb8d",
      "name": "Check Products Hourly",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        20576,
        7488
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "33d3fc8f-a61c-4ce5-b1c1-486f4c618135",
      "name": "Find Products Need Purchase",
      "type": "n8n-nodes-base.airtable",
      "position": [
        20880,
        7488
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbljPbeJv8V58CZWr",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tbljPbeJv8V58CZWr",
          "cachedResultName": "Products"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "{Needs Refill} = 1"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 2.1
    },
    {
      "id": "233d43e1-0b1b-4648-86e9-8a94273e431b",
      "name": "Find Draft PO for Supplier",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21568,
        7472
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblaoU05NUR1ZPTLK",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblaoU05NUR1ZPTLK",
          "cachedResultName": "Purchase Orders"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "={PO ID} = \"{{ $json[\"Draft PO ID_2\"][0] }}\""
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "14681ae3-1ce5-4058-ad09-cb7dcbe2a6e1",
      "name": "Merge Product and Stock In Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        21360,
        7472
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "clashHandling": {
            "values": {
              "resolveClash": "addSuffix"
            }
          }
        },
        "advanced": true,
        "joinMode": "keepEverything",
        "mergeByFields": {
          "values": [
            {
              "field1": "Product[0]",
              "field2": "id"
            }
          ]
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "e3c1b9a9-b34f-4dd4-8a8b-2c10255859ca",
      "name": "Find Existing Stock In",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21120,
        7376
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblynUveOYVAvQ6NE",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblynUveOYVAvQ6NE",
          "cachedResultName": "Stock In"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "={SKU and Status (helper)} = \"{{ $('Find Products Need Purchase').item.json.SKU }} - Draft\""
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "9095e8ac-4eae-477d-848b-afabc06bea7c",
      "name": "Is there Stock In Already",
      "type": "n8n-nodes-base.if",
      "position": [
        21776,
        7472
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "32b1f19c-fd39-43be-85a4-3094f6447a51",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ !!$('Merge Product and Stock In Data').item.json.id_1 }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "aa786ba7-3869-4a4d-86f4-3b1f15099fd7",
      "name": "Update Stock In",
      "type": "n8n-nodes-base.airtable",
      "position": [
        22016,
        7392
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblynUveOYVAvQ6NE",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblynUveOYVAvQ6NE",
          "cachedResultName": "Stock In"
        },
        "columns": {
          "value": {
            "id": "={{ $('Merge Product and Stock In Data').item.json.id_1 }}",
            "Quantity": "={{ $('Find Products Need Purchase').item.json['Refill Qty'] - $('Find Products Need Purchase').item.json['Forecast Qty'] }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Product",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Quantity",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Quantity",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Purchase Order",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Purchase Order",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Product Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "PO Status",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "PO Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SKU and Status (helper)",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "SKU and Status (helper)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c91d8cbe-dcf1-4f5c-af8b-52cb152d50a6",
      "name": "Create Stock In",
      "type": "n8n-nodes-base.airtable",
      "position": [
        22016,
        7552
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblynUveOYVAvQ6NE",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblynUveOYVAvQ6NE",
          "cachedResultName": "Stock In"
        },
        "columns": {
          "value": {
            "Product": "=[\"{{ $('Find Products Need Purchase').item.json.id }}\"]",
            "Quantity": "={{ $('Find Products Need Purchase').item.json['Refill Qty'] - $('Find Products Need Purchase').item.json['Forecast Qty'] }}",
            "Purchase Order": "=[\"{{ $json.id }}\"]"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Product",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Quantity",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Quantity",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Purchase Order",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Purchase Order",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Product Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "PO Status",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "PO Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SKU and Status (helper)",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "SKU and Status (helper)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "SKU and Status (helper)"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c26995a5-e7fa-4614-9a61-c3eb39a34d57",
      "name": "PO Enters Needs Email",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        20592,
        7888
      ],
      "parameters": {
        "baseId": {
          "__rl": true,
          "mode": "url",
          "value": "https://airtable.com/appN9ivOwGQt1FwT5/tblaoU05NUR1ZPTLK/viwP97rB9cZ9JBElJ?blocks=hide"
        },
        "tableId": {
          "__rl": true,
          "mode": "url",
          "value": "https://airtable.com/appN9ivOwGQt1FwT5/tblaoU05NUR1ZPTLK/viwP97rB9cZ9JBElJ?blocks=hide"
        },
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerField": "Status Last Modified",
        "authentication": "airtableTokenApi",
        "additionalFields": {
          "formula": "{Status} = \"Needs Email\""
        }
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8783c720-d3aa-42b8-ac91-5e3568b1d14e",
      "name": "Email Orders Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20784,
        7760
      ],
      "parameters": {
        "color": 6,
        "width": 1424,
        "height": 416,
        "content": "## Sends out order to Suppliers in Email"
      },
      "typeVersion": 1
    },
    {
      "id": "41b6d1e1-a1b7-4061-a2fe-c0c151b69aa4",
      "name": "Create SO",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21072,
        8352
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "url",
          "value": "https://airtable.com/appN9ivOwGQt1FwT5/tbljPbeJv8V58CZWr"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl7lx9nDHdVlNq57",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tbl7lx9nDHdVlNq57",
          "cachedResultName": "Sales Orders"
        },
        "columns": {
          "value": {
            "SO ID": "={{ `${Math.random().toString(16).slice(2,10)}` }}",
            "Status": "Sent"
          },
          "schema": [
            {
              "id": "SO ID",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "SO ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Draft",
                  "value": "Draft"
                },
                {
                  "name": "Sent",
                  "value": "Sent"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Stock Out",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Stock Out",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Total Products",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Total Products",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "33386f17-23cc-4feb-ab50-6a05583d0aba",
      "name": "Create SO Line",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21488,
        8352
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblK8e458kyOf9odT",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblK8e458kyOf9odT",
          "cachedResultName": "Stock Out"
        },
        "columns": {
          "value": {
            "Product": "=[\"{{ $json.id }}\"]",
            "Quantity": "={{ Math.floor(Math.random() * $json['Current Qty']) }}",
            "Sales Order": "=[\"{{ $('Create SO').item.json.id }}\"]"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Product",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Quantity",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Quantity",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sales Order",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Sales Order",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SO Status",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "SO Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Name",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Product Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SO Status (Text)",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "SO Status (Text)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Is Sent?",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Is Sent?",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "219498e5-2cfa-4b3b-934d-8f43acfd9656",
      "name": "Send out PO to Supplier",
      "type": "n8n-nodes-base.gmail",
      "position": [
        20832,
        7888
      ],
      "parameters": {
        "sendTo": "supplier@example.com",
        "message": "={{ $json.fields[\"Order Email Body\"] }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "=New Order - No.  {{ $json.fields[\"PO ID\"] }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2c3d5986-b6f3-422d-bca2-b2afdd6ab9f3",
      "name": "Update PO Status",
      "type": "n8n-nodes-base.airtable",
      "position": [
        21056,
        7888
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appN9ivOwGQt1FwT5",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5",
          "cachedResultName": "[YT] Inventory Management"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tblaoU05NUR1ZPTLK",
          "cachedResultUrl": "https://airtable.com/appN9ivOwGQt1FwT5/tblaoU05NUR1ZPTLK",
          "cachedResultName": "Purchase Orders"
        },
        "columns": {
          "value": {
            "id": "={{ $('PO Enters Needs Email').item.json.id }}",
            "Status": "Order"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "PO ID",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "PO ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Order Email Body",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Order Email Body",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Order Lines",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Order Lines",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Draft",
                  "value": "Draft"
                },
                {
                  "name": "Needs Email",
                  "value": "Needs Email"
                },
                {
                  "name": "Order",
                  "value": "Order"
                },
                {
                  "name": "Received",
                  "value": "Received"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Stock In Records",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Stock In Records",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Supplier",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Supplier",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Supplier Email Address",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Supplier Email Address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Modified",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Last Modified",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status Last Modified",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Status Last Modified",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Order Email Beginning (from Supplier)",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "Order Email Beginning (from Supplier)",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "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 when inventory falls below thresholds, and sends formatted orders to suppliers via email.\n\nThe workflow handles three key processes: ensuring each supplier always has a draft purchase order available, intelligently adding products to those orders based on forecasted stock levels versus threshold quantities, and automatically emailing suppliers when orders are ready to be sent.\n\n### First Setup\n\n**Required:** You must first copy the Airtable inventory base into your own account from: https://airtable.com/appN9ivOwGQt1FwT5/shr1ApcBSi4SOVoPh\n\nYou'll need to configure:\n- **Airtable credentials:** Personal Access Token with read/write permissions to your copied base\n- **Gmail credentials:** OAuth2 connection for sending purchase order emails to suppliers\n\nAfter copying the base, update all Airtable node connections to point to your base URL and table IDs.\n\n### Configuration\n\nThe workflow runs on an **hourly schedule** to check for products needing reorder. You can adjust this frequency in the \"Hourly\" Schedule Trigger node.\n\nThe test workflow (\"Generate random SO\") is manual-trigger only and simulates daily sales by randomly reducing product quantities\u2014useful for testing the reorder automation without real sales data.\n\nAll supplier-specific settings (emails, reorder thresholds, refill quantities) are managed directly in the Airtable base, not in the workflow itself."
      },
      "typeVersion": 1
    },
    {
      "id": "0ad07274-2fa1-4e00-9fbe-c022d8b6c4e4",
      "name": "Creator Contact Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        19872,
        6320
      ],
      "parameters": {
        "color": 5,
        "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/95700d17ba300a9f14c1b8cacf933df7720027b3adda9cbe6183d89142925422?r=pg&d=retro&size=100)\n\n\n### We help businesses eliminate busywork by building compact business tools tailored to your process.\n### Contact us for customizing this, or building similar automations.\n\n\ud83d\udce7 hello@smoothwork.ai\n\u25b6\ufe0f [Check us on YouTube](https://www.youtube.com/@vasarmilan)\n\ud83d\udcde [Book a Free Consulting Call](https://smoothwork.ai/book-a-call/)\n\ud83d\udcbc [Add me on Linkedin](https://www.linkedin.com/in/mil%C3%A1n-v%C3%A1s%C3%A1rhelyi-3a9985123/)\n"
      },
      "typeVersion": 1
    },
    {
      "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)"
      },
      "typeVersion": 1
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

[](https://youtu.be/4CQ3o7qChIs)

Source: https://n8n.io/workflows/11184/ — original creator credit. Request a take-down →

More Email & Gmail workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Email & Gmail

Recruiting agency. Uses typeformTrigger, airtable, httpRequest, googleDrive. Event-driven trigger; 36 nodes.

Typeform Trigger, Airtable, HTTP Request +4
Email & Gmail

Streamline Data From An N8N Form Into Google Sheet Airtable And Email Sending. Uses formTrigger, airtable, stickyNote, googleSheets. Event-driven trigger; 10 nodes.

Form Trigger, Airtable, Google Sheets +1
Email & Gmail

Streamline data from an n8n form into Google Sheet and Airtable. Uses formTrigger, airtable, stickyNote, googleSheets. Event-driven trigger; 10 nodes.

Form Trigger, Airtable, Google Sheets +1
Email & Gmail

Error Tracking. Uses errorTrigger, airtable, gmail. Event-driven trigger; 6 nodes.

Error Trigger, Airtable, Gmail
Email & Gmail

This n8n template automatically processes inbound form leads, researches their company via their website, and uses AI to write and send a highly personalized "speed to lead" email instantly. It also t

Airtable, HTTP Request, OpenAI +2