Quick overview
This workflow checks AutoCount stock every weekday, works out what to reorder from sales, stock and open purchase orders, and asks your buyer to approve in Slack. Unanswered requests go to a backup approver, large orders need manager approval, and approved purchase orders are raised and emailed to suppliers.
How it works
- Runs every weekday at 7am and reads your reorder rules (product, reorder level, reorder quantity, supplier, lead time, unit cost) from Google Sheets.
- Pulls stock balances, recent sales invoices, purchase orders, products and suppliers from AutoCount, and totals each product's stock on hand at your location, units sold in the look-back period and units already on open purchase orders.
- Works out average daily sales and a reorder point for each product: the higher of your reorder level and the stock needed to cover the supplier's lead time plus safety days. Products at or below it get an order quantity, and rules with an unknown product or supplier are flagged as sheet problems.
- Groups the order lines into one proposed purchase order per supplier, and flags open purchase orders older than your limit so they can be closed.
- Sends the buyer one Slack form to tick which purchase orders to raise and which old ones to close. If the buyer doesn't answer within the set hours, a backup approver gets the same form; if nobody answers, nothing is ordered.
- Purchase orders above your spending limit go to a manager in Slack and are only raised once the manager ticks them.
- Approved purchase orders are created in AutoCount and emailed to suppliers with Gmail, ticked old purchase orders are closed, and every outcome (raised, closed, skipped, rejected or failed) is logged to Google Sheets and summed up in one Slack message.
Setup
- Add the AutoCount node. On n8n Cloud it is a verified community node: search "AutoCount" in the nodes panel (an admin may need to turn on Verified community nodes). On self-hosted n8n, go to Settings → Community Nodes → Install and enter n8n-nodes-autocount.
- In AutoCount Cloud Accounting, open your company and note the Account Book ID (the number after the domain in the address bar). Then click the gear icon → Find Your Key ID & API Key → Create API Key. Create an "AutoCount Cloud Accounting API" credential in n8n with these three values and select it on every AutoCount node.
- Create a Google Sheet with a "Reorder rules" tab (productCode, reorderLevel, reorderQty, supplierCode, leadTimeDays, unitCost, active) and a "Reorder log" tab (date, action, supplier, document, amount, details). Connect Google Sheets and select the sheet in both Google Sheets nodes.
- Connect Slack and choose a channel on each Slack node: the buyer on Ask buyer to approve, the backup approver on Ask backup approver and the manager on Ask manager to approve. Connect Gmail on Email PO to supplier, and make sure suppliers have an email address in AutoCount.
- Fill in Settings: stock location, sales look-back days, default lead time, safety days, when a purchase order counts as old, the spending limit, how many hours approvers have to answer, and the delivery address and buyer details.
- Run the workflow once by hand with a couple of rules, approve one supplier in Slack, check the purchase order in AutoCount, then activate.
Requirements
- AutoCount Cloud Accounting account with API access (Account Book ID, Key ID and API Key)
- The verified AutoCount community node (n8n-nodes-autocount)
- Google Sheets for the reorder rules and log
- Slack workspace for the buyer, backup and manager approvals
- Gmail account for emailing purchase orders to suppliers
Customization
- Swap the Slack approvals for Gmail, Telegram or Microsoft Teams "send and wait".
- Round order quantities to carton sizes or supplier minimums in Work out order quantity.
- Change the spending limit, or skip manager approval by setting a very high limit.
- Run one copy per warehouse by changing the stock location in Settings.
- Use a longer sales look-back for seasonal products.
Additional info
Need help or want to customize this?
Contact us via [email protected] or visit our site at framworq.com.