MRPeasy Inventory Alerts Setup with n8n in 20 Minutes

Lagerbestand überwachen: MRPeasy & n8n Benachrichtigungen

🇬🇧 English

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 Authorization with the value Bearer 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-alerts channel. 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

  1. Temporarily lower the threshold to a value above your current stock so the filter returns results.
  2. Execute the workflow manually and confirm the notification arrives.
  3. 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 offset parameter 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.

🇩🇪 Deutsch

Dieser Artikel enthält Affiliate-Links (Werbung). Kaufst du darüber, erhalten wir ggf. eine Provision – für dich ohne Mehrkosten.

Lagerbestand automatisch überwachen: Benachrichtigungen mit MRPeasy und n8n einrichten

Produktionsstopps wegen fehlender Bauteile gehören zu den teuersten und gleichzeitig vermeidbarsten Problemen in der Fertigung. Trotzdem bemerken die meisten Teams einen kritisch niedrigen Lagerbestand erst dann, wenn jemand das Regal physisch prüft – oder wenn ein Fertigungsauftrag scheitert. Wer seinen Bestand in MRPeasy verwaltet, hat alle nötigen Daten bereits im System. Was fehlt, ist eine automatische Benachrichtigung, die das Team sofort informiert, sobald ein Artikel unter den Mindestbestand fällt.

Diese Schritt-für-Schritt-Anleitung zeigt, wie du dieses Alert-System mit n8n aufbaust – einem Open-Source-Workflow-Tool mit über 400 Integrationen, das du kostenlos selbst hosten oder als n8n Cloud nutzen kannst. Die Einrichtung dauert etwa 20 Minuten.

Was du aufbaust

Einen zeitgesteuerten n8n-Workflow, der:

  • stündlich (oder nach einem frei wählbaren Zeitplan) die MRPeasy REST API abfragt
  • aktuelle Lagermengen für alle oder ausgewählte Artikel abruft
  • jede Menge mit einem Mindestschwellenwert vergleicht
  • nur dann eine Slack-Nachricht, E-Mail oder Teams-Benachrichtigung sendet, wenn der Bestand zu niedrig ist
  • Doppelmeldungen verhindert, indem bereits gemeldete Artikel gespeichert werden

Voraussetzungen

  • Ein aktiver MRPeasy-Account (ab Starter-Plan) mit aktiviertem API-Zugang
  • Dein MRPeasy API-Key (zu finden unter Einstellungen → Integrationen → API)
  • Eine n8n-Instanz — Cloud oder selbst gehostet
  • Eine Slack-Webhook-URL, ein SMTP-Konto oder einen Microsoft-Teams-Webhook für Benachrichtigungen

Schritt 1 — MRPeasy-API aktivieren

Melde dich in MRPeasy an und gehe zu Einstellungen → Integrationen → API. Erstelle einen neuen API-Key und kopiere ihn. MRPeasy nutzt eine einfache schlüsselbasierte REST API – kein OAuth-Flow notwendig. Bewahre den Key sicher auf; du fügst ihn gleich als Credential in n8n ein.

Schritt 2 — Neuen Workflow in n8n anlegen

Öffne n8n und klicke auf New Workflow. Füge einen Schedule Trigger-Node hinzu und stelle ihn auf stündliche Ausführung ein. Für schnell drehende Produktionslinien sind auch 15 Minuten sinnvoll.

Schritt 3 — Lagermengen aus MRPeasy abrufen

Füge nach dem Trigger einen HTTP Request-Node hinzu und konfiguriere ihn so:

  • Methode: GET
  • URL: https://app.mrpeasy.com/rest/v1/stock-levels
  • Authentifizierung: Header Auth — Header-Name Authorization, Wert Bearer DEIN_API_KEY
  • Query-Parameter: limit=100 (bei mehr Artikelnummern erhöhen)

Führe den Node einmal manuell aus, um zu prüfen, ob du ein JSON-Array mit Produkten und Mengenfeldern erhältst. Typische Felder sind product_id, product_name, quantity_on_hand und unit.

Schritt 4 — Artikel unterhalb des Schwellenwerts filtern

Füge nach dem HTTP-Request-Node einen Code-Node (JavaScript) hinzu. Er durchläuft alle zurückgegebenen Artikel und behält nur diejenigen, deren Bestand unter dem definierten Mindestwert liegt.


// Einfaches Beispiel mit einem einheitlichen Schwellenwert
const threshold = 10;
const items = $input.all();

return items.filter(item => {
 const qty = item.json.quantity_on_hand;
 return qty !== undefined && qty < threshold;
});

Für artikelspezifische Mindestmengen ersetzt du den festen Wert durch eine Abfrage aus einer Google-Tabelle oder einem n8n-Static-Data-Objekt, das product_id auf den jeweiligen Mindestwert mappt.

Schritt 5 — Doppelbenachrichtigungen vermeiden

Ohne Deduplizierung erhält dein Team jede Stunde eine neue Meldung für jeden Artikel mit niedrigem Bestand – auch wenn sich nichts verändert hat. Füge einen weiteren Code-Node hinzu, der n8ns eingebaute Static Workflow Data ($getWorkflowStaticData('global')) nutzt. Speichere dort die IDs bereits gemeldeter Artikel und leite nur neue Unterschreitungen weiter.


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);
 }
}

staticData.alerted = alreadyAlerted;
return newAlerts;

Schritt 6 — Benachrichtigung versenden

Füge den passenden Benachrichtigungs-Node für dein Team hinzu:

  • Slack: Nutze den integrierten Slack-Node. Poste in einen #lager-alerts-Kanal mit Produktname, aktueller Menge und einem Direktlink zum Artikel in MRPeasy.
  • E-Mail: Verwende den Send-Email-Node mit deinen SMTP-Zugangsdaten.
  • Microsoft Teams: Nutze den HTTP-Request-Node mit einer Teams Incoming Webhook URL.

Eine gut formatierte Slack-Nachricht könnte so aussehen:


⚠️ Niedriger Lagerbestand
Artikel: {{ $json.product_name }}
Verfügbar: {{ $json.quantity_on_hand }} {{ $json.unit }}
Jetzt nachbestellen: https://app.mrpeasy.com/products/{{ $json.product_id }}

Schritt 7 — Branch für Wiederbevorratu (optional, aber empfohlen)

Für ein saubereres Erlebnis teile den Workflow nach dem HTTP-Request-Node mit einem IF-Node auf. Ein Branch verarbeitet Artikel unterhalb des Schwellenwerts (Alerts). Ein zweiter Branch prüft, ob zuvor gemeldete Artikel wieder aufgefüllt wurden, und sendet eine kurze „Bestand wiederhergestellt"-Meldung, bevor das Flag gelöscht wird.

Schritt 8 — Testen und aktivieren

  1. Setze den Schwellenwert vorübergehend höher als deinen aktuellen Bestand, damit der Filter Ergebnisse liefert.
  2. Führe den Workflow manuell aus und prüfe, ob die Benachrichtigung ankommt.
  3. Stelle den echten Schwellenwert wieder ein und aktiviere den Workflow.

Der fertige Workflow hat sechs bis acht Nodes und passt auf einen einzelnen Canvas-Bildschirm. Neue Artikel in MRPeasy werden beim nächsten Durchlauf automatisch erfasst.

Tipps für einen produktionsreifen Aufbau

  • n8n-Credentials nutzen — speichere den MRPeasy API-Key als Header-Auth-Credential, nicht als Klartext im Node.
  • Paginierung bei großen Katalogen — ab 100 Artikelnummern den offset-Parameter von MRPeasy verwenden und einen Loop-Over-Items-Node einsetzen.
  • Jeden Alert protokollieren — jeden Eintrag in eine Google-Tabelle oder Airtable schreiben, um eine Einkaufshistorie aufzubauen.
  • Nach Dringlichkeit staffeln — kritisch niedrige Bestände (unter 20 % des Minimums) als @channel-Nachricht senden, normale Unterschreitungen als reguläre Meldung.
  • Lieferzeiten einbeziehen — wenn MRPeasy Lieferzeiten für Lieferanten enthält, diese Felder in die Benachrichtigung aufnehmen, damit der Einkäufer die Dringlichkeit sofort einschätzen kann.

Warum das besser ist als manuelle Kontrollen

Manuelle Lagerprüfungen finden bestenfalls einmal täglich statt – meistens dann, wenn der Druck schon hoch ist. Eine automatische stündliche Prüfung gibt dem Einkaufsteam genug Vorlaufzeit, um nachzubestellen, bevor eine Produktionslinie steht. In Kombination mit dem Einkaufsmodul von MRPeasy kann der gesamte Ablauf vom Alert bis zur Bestellung mit minimalem manuellem Aufwand laufen.

Wenn du Lagerbestände und Produktionsplanung für ein kleines oder mittelständisches Fertigungsunternehmen verwaltest, kannst du über MRPeasy alles in einem System abbilden — inklusive Cloud-ERP speziell für kleine Hersteller — und so Produktionsstopps durch leere Regale dauerhaft vermeiden.