Quick Overview
This workflow receives IT asset requests via a webhook, logs each request to Airtable, checks stock in an Airtable inventory table, and either approves the request while decrementing inventory or creates an exception record for insufficient stock before returning a JSON response.
How it works
- Receives an IT asset request via a POST webhook.
- Generates a unique request ID and stores the incoming request body for downstream steps.
- Creates a new record in Airtable (IT Asset Management base) in the Asset Requests table with the request details and a default Pending status.
- Searches the Airtable Inventory table for the requested asset type and compares the available quantity to the requested quantity.
- If stock is sufficient, updates the inventory quantity and updates the Airtable request record to Approved.
- If stock is insufficient, creates an exception record in Airtable with the reason Insufficient Stock and a Pending Review status.
- Returns a JSON webhook response indicating either approval or out-of-stock handling.
Setup
- Create or select an Airtable base with tables for Asset Requests, Inventory (including Asset Type and Available Quantity fields), and an Exceptions table to log insufficient stock cases.
- Add an Airtable Personal Access Token credential in n8n and update the base ID/table IDs if you are not using the provided ones.
- Configure the calling system to send a POST request to the workflow’s webhook URL with the expected fields (employeeName, employeeId, department, assetType, quantity, priority).