AutomationFlowsSlack & Telegram › Order Processing with Google Sheets and Slack: Inventory Checks and Alerts

Order Processing with Google Sheets and Slack: Inventory Checks and Alerts

BySatoshi @satoshi on n8n.io

A cornerstone of your Order Management System, this workflow ensures seamless inventory control through fully automated stock checks, leading to a direct reduction in operational costs. It provides real-time alerts to the responsible personnel, enabling proactive issue detection…

Webhook trigger★★★★☆ complexity18 nodesGoogle SheetsSlack
Slack & Telegram Trigger: Webhook Nodes: 18 Complexity: ★★★★☆ Added:

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

This workflow follows the Google Sheets → Slack 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
{
  "id": "72acApWbBkALkncy",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Order Processing with Google Sheets Inventory Checks & Slack Alerts",
  "tags": [],
  "nodes": [
    {
      "id": "530ff29c-9bdf-4968-8249-f2f7bb7a00fb",
      "name": "Order Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -560,
        32
      ],
      "parameters": {
        "path": "ecom-order",
        "options": {},
        "httpMethod": "POST",
        "responseData": "allEntries",
        "responseMode": "lastNode"
      },
      "typeVersion": 1
    },
    {
      "id": "a9abbf93-090a-4861-8040-35f9a6262502",
      "name": "Check Order",
      "type": "n8n-nodes-base.function",
      "position": [
        -352,
        32
      ],
      "parameters": {
        "functionCode": "const body = $json.body || $json;\n\nif (!body.id || !body.customer || !body.items || body.items.length === 0) {\n  throw new Error('Invalid order payload');\n}\n\nreturn [{ json: body }];"
      },
      "typeVersion": 1
    },
    {
      "id": "a2a36044-2235-4aff-a685-4665ff8a6fbc",
      "name": "Request Info",
      "type": "n8n-nodes-base.function",
      "position": [
        -144,
        32
      ],
      "parameters": {
        "functionCode": "let payload = $json;\nif (payload.body) payload = payload.body;\n\nconst order = {\n  id: payload.id,\n  customer: {\n    name: payload.customer?.name || '',\n    email: payload.customer?.email || ''\n  },\n  items: (payload.items || []).map(i => ({\n    sku: i.sku || null,\n    qty: i.quantity || 1,\n    name: i.name || '',\n    price: i.price || 0\n  })),\n  total: payload.total || 0\n};\n\nreturn [{ json: order }];"
      },
      "typeVersion": 1
    },
    {
      "id": "b86ca7ce-935d-42f1-a6a0-e851d489b306",
      "name": "Item and quantity",
      "type": "n8n-nodes-base.function",
      "position": [
        80,
        32
      ],
      "parameters": {
        "functionCode": "const orderItems = $json[\"items\"];\n\nreturn orderItems.map(i => {\n  return {\n    json: {\n      sku: i.sku,\n      qty: i.qty\n    }\n  };\n});"
      },
      "typeVersion": 1
    },
    {
      "id": "bfb3179e-2337-4e34-9270-e8b5bb2c3836",
      "name": "Get Inventories",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        304,
        -80
      ],
      "parameters": {
        "range": "Inventories!A:B",
        "options": {},
        "sheetId": "1sgTaHwbTWrVCDiSwuvqFVJr0-Ez2t3LTlJaLU4cBcuU",
        "operation": "lookup",
        "lookupValue": "={{$json[\"sku\"]}}",
        "lookupColumn": "sku"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "2ac676e9-dfc9-4744-8cc2-efe76b85920a",
      "name": "Mapping data",
      "type": "n8n-nodes-base.merge",
      "position": [
        544,
        16
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "fieldsToMatchString": "sku"
      },
      "typeVersion": 3.2
    },
    {
      "id": "a6407f6f-416c-441e-b25c-427168e48f7f",
      "name": "enough stock?",
      "type": "n8n-nodes-base.if",
      "position": [
        784,
        16
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $items().every(item => item.json.qty <= item.json.stock) }}",
              "value2": "={{ true }}"
            }
          ]
        },
        "combineOperation": "any"
      },
      "typeVersion": 1
    },
    {
      "id": "bf3892bd-9fad-4bd2-a7b1-c21aa60e21a4",
      "name": "Create Invoice",
      "type": "n8n-nodes-base.function",
      "position": [
        1040,
        -96
      ],
      "parameters": {
        "functionCode": "return [{ json: {\n  invoiceId: 'INV-' + new Date().getTime(),\n  orderId: $node[\"Request Info\"].json[\"id\"],\n  sku: $node[\"Item and quantity\"].json[\"sku\"],\n  qty: $node[\"Item and quantity\"].json[\"qty\"],\n  customer: $node[\"Request Info\"].json[\"customer\"][\"name\"],\n  amount: $node[\"Request Info\"].json[\"total\"],\n  date: new Date().toISOString()\n}}];"
      },
      "typeVersion": 1
    },
    {
      "id": "ac99fbed-8bac-4c40-a39c-1f2855e110e7",
      "name": "create data logs (success)",
      "type": "n8n-nodes-base.function",
      "position": [
        1536,
        -96
      ],
      "parameters": {
        "functionCode": "return [{ json: {\n  order_id: $node[\"Request Info\"].json[\"id\"],\n  amount: $node[\"Request Info\"].json[\"total\"],\n  status: \"Success\",\n  created_at: new Date().toISOString()\n}}];"
      },
      "typeVersion": 1
    },
    {
      "id": "9b7cf0fc-c6e7-4829-a4f9-eb22eef42285",
      "name": "create data logs (Stock shortage)",
      "type": "n8n-nodes-base.function",
      "position": [
        1536,
        80
      ],
      "parameters": {
        "functionCode": "return [{ json: {\n  order_id: $node[\"Request Info\"].json[\"id\"],\n  amount: $node[\"Request Info\"].json[\"total\"],\n  status: \"Out of Stock\",\n  created_at: new Date().toISOString()\n}}];"
      },
      "typeVersion": 1
    },
    {
      "id": "45dc92c9-bfc9-4be2-a2fb-1aa89c557011",
      "name": "Save logs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1792,
        16
      ],
      "parameters": {
        "range": "OrderLogs!A:E",
        "options": {
          "usePathForKeyRow": true
        },
        "sheetId": "1sgTaHwbTWrVCDiSwuvqFVJr0-Ez2t3LTlJaLU4cBcuU",
        "operation": "append"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "977bd121-fc39-4505-b0d0-0eb8bd6a4137",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -432
      ],
      "parameters": {
        "width": 848,
        "height": 1440,
        "content": "## Overview\nA cornerstone of your Order Management System, this workflow ensures seamless inventory control through fully automated stock checks, leading to a direct reduction in operational costs. It provides real-time alerts to the responsible personnel, enabling proactive issue detection and resolution to eliminate the financial damages associated with unexpected stock-outs.\n\n## How it works\n### Order Webhook\nReceives orders from external sources (e.g., website, form, or app) via API.\n\n### Check Order Request\nChecks the validity of the order (e.g., complete product, valid customer details)\n\n### Check Inventory\nRetrieve inventory information and compare it with the order request.\n\n### Notifications\n- Generate a notification to Slack for the manager indicating a successful order or an out-of-stock situation.\n\n### Logging\n- Log the process details to a Google Sheet for tracking.\n\n## Set up steps\n\n### Webhook \n- Create a JSON request with the following format to call the Webhook Url\n\n```\n{\n  \"id\": \"ORDER1001\",\n  \"customer\": {\n    \"name\": \"Customer\",\n    \"email\": \"customer@example.com\"\n  },\n  \"items\": [\n    {\n      \"sku\": \"SKU001\",\n      \"quantity\": 2,\n      \"name\": \"Product A\",\n      \"price\": 5000\n    },\n    {\n      \"sku\": \"SKU002\",\n      \"quantity\": 2,\n      \"name\": \"Product C\",\n      \"price\": 10000\n    }\n  ],\n  \"total\": 30000\n}\n```\n\n- Define the greater than or less than conditions on the inventory level to enter the corresponding branches.\n\n### Google Sheet \n- Clone the file to your Google Drive. ([WMS Data Demo](https://docs.google.com/spreadsheets/d/1sgTaHwbTWrVCDiSwuvqFVJr0-Ez2t3LTlJaLU4cBcuU/edit?usp=sharing))\n- Replace your credentials and connect.\n- Access permission must be granted to n8n.\n\n### Slack \n- Replace your credentials and connect.\n- A channel named \"warehouse\" needs to be prepared to receive notifications (if using a different name, you must update the Slack node).\n"
      },
      "typeVersion": 1
    },
    {
      "id": "68784936-2e4b-482a-86a0-745104fef6b5",
      "name": "Slack notification (OK)",
      "type": "n8n-nodes-base.slack",
      "position": [
        1296,
        -96
      ],
      "parameters": {
        "text": "={{ '\u2705 Order ' + $json.orderId + 'Invoiced. \\nInvoice: ' + $json.invoiceId + ', \\nAmount: $' + $json.amount + ', \\nCustomer: ' + $json.customer + ', \\nDate: ' + $json.date}}",
        "channel": "#warehouse",
        "attachments": [],
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c47c7b84-caa8-49ff-8a47-52e22ff28027",
      "name": "Slack notification (Stock shortage)",
      "type": "n8n-nodes-base.slack",
      "position": [
        1296,
        80
      ],
      "parameters": {
        "text": "={{'\u26a0\ufe0f Order '}} {{ $('Request Info').item.json.id }} {{'is not available for order due to lack of stock.'}} \n{{'\\n SKU: '}} {{ $json.sku }}\n{{'\\n Request quantity: '}} {{ $json.qty }}\n{{'\\n Stock quantity: '}} {{ $json.stock }}",
        "channel": "#warehouse",
        "attachments": [],
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "89964e97-c855-425f-a006-244dc9a54939",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 848,
        "height": 480,
        "content": "## Order Request\nAfterwards, process the data to determine the product and the ordered quantity."
      },
      "typeVersion": 1
    },
    {
      "id": "1ad2d9e5-27c4-4eba-9fb4-88fef7164a6f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 480,
        "content": "## Check Inventory\nRetrieve inventory information and compare it with the order request."
      },
      "typeVersion": 1
    },
    {
      "id": "a9e885fc-aa38-47f4-aa97-1a5abf4bcddb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 480,
        "content": "## Notifications\nGenerate a notification to Slack for the manager indicating a successful order or an out-of-stock situation."
      },
      "typeVersion": 1
    },
    {
      "id": "17a2cd56-592a-4329-b7a9-3ccbb2e3028f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 480,
        "content": "## Logging\nLog the process details to a Google Sheet for tracking."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "97aa0bcd-db97-4bb1-9204-1a2fa6c4e1d9",
  "connections": {
    "Check Order": {
      "main": [
        [
          {
            "node": "Request Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mapping data": {
      "main": [
        [
          {
            "node": "enough stock?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Info": {
      "main": [
        [
          {
            "node": "Item and quantity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Order Webhook": {
      "main": [
        [
          {
            "node": "Check Order",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "enough stock?": {
      "main": [
        [
          {
            "node": "Create Invoice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack notification (Stock shortage)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Invoice": {
      "main": [
        [
          {
            "node": "Slack notification (OK)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Inventories": {
      "main": [
        [
          {
            "node": "Mapping data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Item and quantity": {
      "main": [
        [
          {
            "node": "Get Inventories",
            "type": "main",
            "index": 0
          },
          {
            "node": "Mapping data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Slack notification (OK)": {
      "main": [
        [
          {
            "node": "create data logs (success)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "create data logs (success)": {
      "main": [
        [
          {
            "node": "Save logs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "create data logs (Stock shortage)": {
      "main": [
        [
          {
            "node": "Save logs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack notification (Stock shortage)": {
      "main": [
        [
          {
            "node": "create data logs (Stock shortage)",
            "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

A cornerstone of your Order Management System, this workflow ensures seamless inventory control through fully automated stock checks, leading to a direct reduction in operational costs. It provides real-time alerts to the responsible personnel, enabling proactive issue detection…

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

More Slack & Telegram workflows → · Browse all categories →

Related workflows

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

Slack & Telegram

This workflow is a production-ready Meta Ads Webhook dispatcher for the Ad Account object. It receives webhook deliveries from Meta, returns the required acknowledgement, routes events by , logs them

Google Sheets, Slack
Slack & Telegram

This workflow continuously monitors the Meta Ads Library for new creatives from a specific competitor pages, logs them into Google Sheets, and sends a concise Telegram notification with the number of

HTTP Request, Telegram, Google Sheets +1
Slack & Telegram

Enhance financial oversight with this automated n8n workflow. Triggered every 5 minutes, it fetches real-time bank transactions via an API, enriches and transforms the data, and applies smart logic to

HTTP Request, Email Send, Google Sheets +1
Slack & Telegram

This workflow automates competitive price intelligence using Bright Data's enterprise web scraping API. On a scheduled basis (default: daily at 9 AM), the system loops through configured competitor pr

HTTP Request, Google Sheets, Slack +1
Slack & Telegram

Ensure your customer SLAs never slip with this n8n automation template. The workflow runs on a schedule, fetching open tickets from Zendesk, calculating SLA time remaining, and sending proactive alert

Zendesk, Slack, Google Sheets