This article contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.
MRPeasy Inventory Alerts Setup with n8n in 20 Minutes
Running out of a critical component mid-production is one of the most avoidable—and costly—mistakes in small manufacturing. Yet most teams only notice low stock when someone physically checks the shelf or when a production order fails. If you manage inventory in MRPeasy, you already have the data you need. The missing piece is an automated alert that pushes that information to your team the moment stock drops below a safe threshold.
This guide shows you how to build that alert system using n8n, an open-source workflow automation tool with 400+ integrations that you can self-host for free or run on n8n Cloud. The whole setup takes about 20 minutes.
What You Will Build
A scheduled n8n workflow that:
- Calls the MRPeasy REST API every hour (or on any schedule you choose)
- Reads current stock levels for all or selected products
- Compares each quantity against a minimum threshold
- Sends a Slack message, email, or Teams notification only when stock is below the limit
- Avoids duplicate alerts by tracking which items have already been flagged
Prerequisites
- An active MRPeasy account (Starter plan or higher) with API access enabled
- Your MRPeasy API key (found under Settings → Integrations → API)
- An n8n instance — cloud or self-hosted
- A Slack webhook URL, an SMTP account, or a Microsoft Teams webhook for notifications
Step 1 — Enable the MRPeasy API
Log in to MRPeasy and navigate to Settings → Integrations → API. Generate a new API key and copy it. MRPeasy uses a simple key-based REST API, so no OAuth flow is required. Keep this key safe — you will paste it into n8n as a credential.
Step 2 — Create a New Workflow in n8n
Open n8n and click New Workflow. Add a Schedule Trigger node. Set it to run every hour, or adjust the interval to match how often your inventory changes. For fast-moving production lines, every 15 minutes is reasonable.
Step 3 — Fetch Stock Levels from MRPeasy
Add an HTTP Request node after the trigger. Configure it as follows:
- Method: GET
- URL:
https://app.mrpeasy.com/rest/v1/stock-levels - Authentication: Header Auth — add a header named
Authorizationwith the valueBearer YOUR_API_KEY - Query Parameters: add
limit=100(increase if you have more SKUs)
Run the node once to verify you receive a JSON array of products with their current quantities. Each item typically includes product_id, product_name, quantity_on_hand, and unit.
Step 4 — Filter Items Below the Minimum Threshold
Add a Code node (JavaScript) after the HTTP Request. This node loops through the returned items and keeps only those where the stock is below your threshold. You can hardcode a single threshold or store per-product minimums in an n8n static data object or a Google Sheet.
// Simple single-threshold example
const threshold = 10;
const items = $input.all();
return items.filter(item => {
const qty = item.json.quantity_on_hand;
return qty !== undefined && qty < threshold;
});
For per-product thresholds, replace the hardcoded value with a lookup against a secondary data source that maps product_id to its minimum quantity.
Step 5 — Prevent Duplicate Alerts
Without deduplication your team will receive a new Slack message every hour for every low-stock item — even if nothing has changed. Add another Code node that reads from n8n's built-in static workflow data ($getWorkflowStaticData('global')). Store the IDs of items that were already alerted, and only pass through items that are newly below threshold or whose status has changed.
const staticData = $getWorkflowStaticData('global');
const alreadyAlerted = staticData.alerted || {};
const incoming = $input.all();
const newAlerts = [];
for (const item of incoming) {
const id = item.json.product_id;
if (!alreadyAlerted[id]) {
alreadyAlerted[id] = true;
newAlerts.push(item);
}
}
// Clear flags for items that are back in stock
// (run a separate branch for restocked items)
staticData.alerted = alreadyAlerted;
return newAlerts;
Step 6 — Send the Notification
Add whichever notification node fits your team's toolstack:
- Slack: Use the built-in Slack node. Post to a
#inventory-alertschannel. Format the message to include product name, current quantity, and a direct link to the item in MRPeasy. - Email: Use the Send Email node with your SMTP credentials. Useful if your team does not use Slack.
- Microsoft Teams: Use the HTTP Request node with a Teams Incoming Webhook URL.
A well-formatted Slack message might look like this:
⚠️ Low Stock Alert
Product: {{ $json.product_name }}
On Hand: {{ $json.quantity_on_hand }} {{ $json.unit }}
Reorder Now: https://app.mrpeasy.com/products/{{ $json.product_id }}
Step 7 — Add a Restock Branch (Optional but Recommended)
For a cleaner experience, fork the workflow after the HTTP Request node with an IF node. One branch handles items that are below threshold (alerts). A second branch checks items in the static data that are now back above threshold and sends a short "stock restored" message, then clears their flag. This way your team always knows the current status without scrolling back through old messages.
Step 8 — Test and Activate
- Temporarily lower the threshold to a value above your current stock so the filter returns results.
- Execute the workflow manually and confirm the notification arrives.
- Restore the real threshold and activate the workflow.
The whole workflow will have six to eight nodes and will fit on a single canvas screen. Maintenance is minimal — if you add new products to MRPeasy, they are picked up automatically on the next run.
Tips for a Production-Ready Setup
- Use n8n credentials — store your MRPeasy API key as an n8n Header Auth credential, not as plain text in a node.
- Paginate large catalogs — if you have more than 100 SKUs, loop through pages using MRPeasy's
offsetparameter and a Loop Over Items node. - Log every alert — append each alert to a Google Sheet or Airtable record so you have a history for procurement reviews.
- Tag by severity — split items into two groups: critically low (below 20 % of minimum) and low (below minimum). Send critical alerts as @channel in Slack and standard alerts as regular messages.
- Include lead time data — if your MRPeasy setup records supplier lead times, include that field in the notification so the buyer knows how urgent the reorder is.
Why This Beats Manual Checks
Manual stock reviews happen once a day at best, usually when someone is already under pressure. An automated hourly check means your purchasing team can act on a reorder before a production line stalls. Combined with MRPeasy's purchasing module, the entire loop from alert to purchase order can run with almost no human latency.
If you manage inventory for a small or mid-sized manufacturing business, you can run your production planning, stock control and purchasing in one place via MRPeasy — including cloud ERP built for small manufacturers — to keep your production lines moving without manual stock checks.