Automate inventory management using this n8n workflow. It daily checks stock levels in Google Sheets, calculates reorders, generates purchase orders, sends supplier emails via Gmail, and logs all PO data. Discover more n8n templates.
Download this n8n workflow template and start using it instantly.
Inventory Managers and Operations Teams needing hands-off stock level monitoring.
E-commerce businesses aiming to automate restocking processes.
Users looking for advanced examples of combining Google Sheets and Gmail automation within an n8n template.
Technical users wanting to see how custom logic (Code n8n node) can drive business processes.
Maintaining optimal inventory levels is crucial, but manual checks are time-consuming and prone to error. This powerful n8n workflow solves this by completely automating the procurement cycle.
Starting with an n8n trigger, it scans your primary inventory sheet in Google Sheets for any item tagged as 'Low Stock.' It then applies custom business logic (using the Code n8n node) to intelligently determine the exact quantity needed, factoring in thresholds, minimum orders, and maximum order limits. The system aggregates orders by supplier, generates professional email drafts for the purchase order, sends them using Gmail, and simultaneously logs all PO details to a dedicated Purchase Order sheet in Google Sheets. This robust n8n automation ensures you never miss a reorder point, saving time and preventing stockouts.
This comprehensive n8n workflow executes daily based on a scheduled n8n trigger:
Trigger Everyday n8n trigger initiates the automation at a set time (e.g., daily).Get Low Stock Product n8n node queries the Google Sheet, fetching all inventory rows where the 'Inventory Status' is 'Low Stock'.Order Handling Code n8n node runs custom JavaScript to analyze each item's stock level against its minimum threshold. It calculates the order_qty needed, respecting defined minimum and maximum order constraints.Generate Email & PO Code n8n node groups the calculated orders by supplier. It dynamically generates the standardized purchase order email body, subject, and creates separate data items representing the PO rows to be logged.Switch Email & PO n8n node directs flow based on the item type (Email or PO).Loop Over Items n8n node to process each SKU’s PO row individually.Get Purchase Order Google Sheets n8n node checks the 'Purchase Order' sheet to see if an 'In Progress' order already exists for that specific SKU.Check Record Exists Or Not If n8n node evaluates the check. If an active PO exists, the item is routed to No Operation, do nothing. If not, it proceeds.Store a Purchase Order Google Sheets n8n node appends the new PO details (including PO Number, Order Qty, and status 'In Progress') to the tracking sheet, completing the inventory management n8n workflow.To deploy this powerful n8n workflow and start automating your procurement, follow these steps:
Get Low Stock Product and Store a Purchase Order nodes.Send Order to Suplier n8n node. This account must be authorized to send emails on behalf of your procurement team.documentId. Update this ID to point to your actual Inventory Management spreadsheet.Get Low Stock Product filter and the JavaScript code blocks of the Order Handling n8n node. Trigger Everyday (Schedule Trigger n8n trigger): Initiates the entire n8n workflow daily to check stock levels automatically.
Get Low Stock Product (Google Sheets n8n node): Fetches rows from the 'Inventory Stock' sheet where 'Inventory Status' equals 'Low Stock'.
Order Handling (Code n8n node): Implements custom business logic to calculate the precise orderqty needed based on inventory rules (thresholds, minimums, and maximums).
Generate Email & PO (Code n8n node): Groups calculated orders by supplier email and dynamically generates the email content (subject and body) and separate PO record data points.
Switch Email & PO (Switch n8n node): Controls the subsequent flow, routing the data items tagged as 'email' towards Gmail and items tagged as 'po' toward the logging loop.
Send Order to Suplier (Gmail n8n node): Uses expression mapping (={{ $json.supplieremail }}) to send the dynamically generated purchase order email to the correct supplier.
Loop Over Items (SplitInBatches n8n node): Breaks the grouped PO logging data back into individual items for processing and checking against existing records.
Get Purchase Order (Google Sheets n8n node): Checks the 'Purchase Order' sheet for existing active orders (Order Status: In Progress) related to the current SKU.
Check Record Exists Or Not (If n8n node): Determines if the previous Google Sheets n8n node returned any existing record. If the PO record does not exist, it proceeds to create one.
Store a Purchase Order (Google Sheets n8n node): Appends the new purchase order details to the designated 'Purchase Order' sheet, setting the initial 'Order Status' to 'In Progress'.
Automate candidate interview scheduling using Cal.com, synchronize dates in Google Sheets, and perform crucial data cleanup using this robust n8n workflow template.

Use this robust n8n workflow to automatically classify internal complaints using Gemini AI, assign resolvers via Google Sheets, log issues, and send automated Gmail follow-ups for high-stakes HR tasks.

Automate interior design lead qualification using AI and n8n. This advanced n8n workflow scores leads (HOT/WARM/COLD), generates personalized emails, and uses human approval (HITL) before logging data to Notion. Explore these powerful n8n templates.

Use this advanced n8n workflow to automate invoice creation via Jotform and manage intelligent payment reminders using QuickBooks and Outlook, featuring AI-powered daily summary reports.

Use this powerful n8n workflow to automate invoice generation and client email delivery instantly upon project status update in Google Sheets. Leveraging the Google Sheets n8n trigger and specialized n8n node setup.

We are an AI Automation Agency focusing on various AI Automation Services like, workflow automation, shopify automation, chatbot developerment, custom ai agent development and more.







































