🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 21, 2026

Magento to Slack and Gmail, low stock alerts daily

Lisa Granqvist Partner Workflow Automation Expert

Your store doesn’t run out of products all at once. It bleeds stock quietly, SKU by SKU, until a top seller hits zero and you find out from an angry customer (or a panicked support ticket). Magento low stock checks done “when someone remembers” are how surprise stockouts happen.

Ecommerce managers usually feel it first. Then ops leads get pulled into emergency restocks, and founders end up approving decisions in a hurry. This automation gives you daily Slack alerts plus a clean Gmail report, so you catch risky SKUs early and restock calmly.

Below, you’ll see exactly what the workflow does, what you need to run it, and how it turns Magento 2 MSI stock data into alerts your team will actually read.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Magento to Slack and Gmail, low stock alerts daily

The Problem: Low Stock Is Discovered Too Late

Inventory issues rarely show up as one big obvious failure. It’s a slow, messy drift: one warehouse source is low, another is fine, a product is “in stock” overall but not where you can ship from, and suddenly orders can’t be fulfilled on time. If you’re using Magento 2 MSI, the complexity goes up because “stock” isn’t one number anymore. People end up checking the admin, exporting CSVs, or doing quick spot checks only when someone complains. It’s exhausting, and honestly it invites mistakes.

The friction compounds. These are the failure points that keep coming back.

  • Manual stock checks get skipped on busy days, which means you learn about shortages after sales drop.
  • MSI per-source stock is easy to miss, so “available” products still can’t ship from the right location.
  • Teams waste time chasing updates across chat threads because there’s no consistent daily alert.
  • Configurable, virtual, and downloadable products clutter reports, so the few real risks get buried.

The Solution: Daily Magento 2 MSI Stock Alerts to Slack + Gmail

This n8n workflow runs a scheduled Magento 2 stock scan every day (set to 08:50 AM by default). It pulls your product SKU list from Magento’s REST API, then checks MSI stock levels per source so you see what’s happening in each inventory location, not just a single rolled-up number. Next, it filters out product types you don’t want in a replenishment report (configurable, virtual, and downloadable) and analyzes what’s actually at risk using simple, customizable thresholds. If anything is below the threshold, the workflow composes a clear alert message and sends it to Slack plus a formatted HTML email report via Gmail. If nothing is risky, it stays quiet.

The workflow starts on a daily schedule. From there, Magento data is collected and cleaned, then evaluated against low-stock rules (default ≤10 overall or ≤5 per source). Finally, Slack gets a quick, readable alert and Gmail gets a fuller report you can forward or archive.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you manage about 200 active SKUs across 3 inventory sources. Manually checking MSI stock usually means opening Magento, filtering products, spot-checking sources, then messaging the team, which easily takes about 45 minutes each day. With this workflow, the daily trigger runs on its own and your “work” becomes reading a Slack alert (maybe 2 minutes) plus scanning the Gmail HTML report (another 3 minutes). Call it roughly 40 minutes back per day, and fewer missed low-stock items when you’re slammed.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Magento 2 (Adobe Commerce) for SKU and MSI stock data
  • Slack to notify your team in real time
  • Gmail to send the daily HTML stock report
  • Magento Bearer Token (create an integration in Magento Admin)

Skill level: Intermediate. You’ll connect accounts, add credentials, and paste a few API details, but you won’t be writing an app.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A daily schedule kicks it off. n8n runs the workflow every morning (08:50 AM by default), so the check happens even when your team is busy or offline.

Magento SKUs are collected and cleaned. The workflow calls Magento 2’s REST API to retrieve product SKUs, then uses a small code step to parse and standardize the list so it’s ready for lookups.

MSI stock per source is pulled and evaluated. Another Magento API request fetches stock levels, then the workflow analyzes which SKUs are below your thresholds (default rules include ≤10 overall or ≤5 per source) while excluding configurable, virtual, and downloadable products.

Alerts go to Slack and Gmail. If low-stock items exist, the workflow composes a formatted Slack message plus a richer HTML email report and sends both. If nothing is low, it does not spam your channels.

You can easily modify alert thresholds to match your reorder points based on lead times and sales velocity. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Schedule Trigger

Set the workflow to run on a daily schedule using the built-in trigger.

  1. Add and open Scheduled Stock Scan.
  2. Set the Cron Expression to 50 8 * * * to run daily at 8:50 AM.
  3. Connect Scheduled Stock Scan to Retrieve Product SKUs.

Step 2: Connect Magento Inventory Data

Retrieve the product SKU list and pull MSI stock levels from your Magento instance.

  1. Open Retrieve Product SKUs and set URL to =https://magekwik.com/rest/V1/products?searchCriteria[pageSize]=0&searchCriteria[filterGroups][0][filters][0][field]=type_id&searchCriteria[filterGroups][0][filters][0][conditionType]=nin&searchCriteria[filterGroups][0][filters][0][value]=configurable,virtual,downloadable&fields=items[sku,extension_attributes[stock_item[manage_stock]]].
  2. Credential Required: Connect your HTTP Bearer Auth credentials in Retrieve Product SKUs.
  3. Open Pull MSI Stock Levels and set URL to =https://magekwik.com/rest/V1/inventory/source-items?searchCriteria[filterGroups][0][filters][0][field]=sku&searchCriteria[filterGroups][0][filters][0][conditionType]=in&searchCriteria[filterGroups][0][filters][0][value]={{ encodeURIComponent($node["Parse SKU List"].json["skus"].join(',')) }}.
  4. Credential Required: Connect your HTTP Bearer Auth credentials in Pull MSI Stock Levels.
  5. Confirm the flow: Retrieve Product SKUsParse SKU ListPull MSI Stock Levels.

Step 3: Set Up Processing & Stock Analysis

Parse SKUs, evaluate low-stock items, and check if an alert should be sent.

  1. Open Parse SKU List and keep the JavaScript Code that extracts SKUs from $input.first().json.items.
  2. Open Analyze Stock for Shortages and review the thresholds in the JavaScript Code: const lowStockThreshold = 10; and const minSourceQuantity = 5;.
  3. Open Assess Alert Requirement and set the condition Left Value to ={{ $node["Analyze Stock for Shortages"].json["lowStockAlerts"].length > 0 }}, with Operation set to greater than and Right Value set to 0.
  4. Connect Analyze Stock for ShortagesAssess Alert RequirementCompose Alert Message.

Tip: Update the thresholds in Analyze Stock for Shortages to match your inventory policy before going live.

Step 4: Configure Alert Outputs (Slack & Gmail)

Generate alert content, then send it to Slack and Gmail in parallel.

  1. Open Compose Alert Message and keep the JavaScript Code that outputs slackMessage, gmailHtml, and subjectLine.
  2. Open Post Inventory Alert and set Text to ={{ $json.slackMessage }} and choose the Channel value for your Slack workspace.
  3. Credential Required: Connect your Slack credentials in Post Inventory Alert.
  4. Open Dispatch Email Notice and set Send To to [YOUR_EMAIL], Message to ={{ $json.gmailHtml }}, and Subject to ={{ $json.subjectLine }}.
  5. Credential Required: Connect your Gmail credentials in Dispatch Email Notice.
  6. Compose Alert Message outputs to both Post Inventory Alert and Dispatch Email Notice in parallel.

⚠️ Common Pitfall: If Slack or Gmail credentials are missing, alerts will fail even when the stock analysis is correct.

Step 5: Test and Activate Your Workflow

Validate the full flow from SKU retrieval through alerts, then enable it for daily execution.

  1. Click Execute Workflow to run a manual test from Scheduled Stock Scan.
  2. Confirm that Retrieve Product SKUs returns items and Parse SKU List outputs a skus array.
  3. Verify Analyze Stock for Shortages returns a lowStockAlerts list and that Assess Alert Requirement passes when the list is non-empty.
  4. Check that Slack receives the message from Post Inventory Alert and Gmail receives the HTML email from Dispatch Email Notice.
  5. Turn the workflow Active to enable the scheduled daily scan.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Magento (HTTP Request) credentials can expire or lack access to inventory endpoints. If things break, check the integration’s token and API user permissions in Magento Admin first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Magento low stock automation?

About 45 minutes if your Magento token, Slack, and Gmail are ready.

Do I need coding skills to automate Magento low stock alerts?

No. You’ll paste credentials, choose thresholds, and test one run.

Is n8n free to use for this Magento low stock workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Magento, Slack, and Gmail usage costs (usually $0 unless you’re on paid plans or hitting strict API limits).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Magento low stock workflow for different thresholds per warehouse?

Yes, and it’s the most common tweak. Update the threshold values in the “Analyze Stock for Shortages” code step, and adjust the condition in “Assess Alert Requirement” if you want separate rules per source. Many teams also customize which product types are excluded and how the Slack message is formatted in “Compose Alert Message.”

Why is my Magento connection failing in this workflow?

Most of the time it’s an expired Bearer token or the API user behind that token doesn’t have the right permissions for inventory endpoints. Double-check the base URL and make sure you’re hitting the correct Magento REST path for your instance. If it fails only sometimes, you may be getting rate limited during the MSI lookups, so batching (Split in Batches) and slight delays help. Also confirm your store isn’t blocking requests by IP or WAF rules.

How many SKUs can this Magento low stock automation handle?

A few hundred SKUs per day is normal on a small VPS, and it scales further with batching and a slightly higher n8n execution timeout.

Is this Magento low stock automation better than using Zapier or Make?

Often, yes, because MSI checks and per-source analysis usually need branching logic and looping that gets awkward (and pricey) in simpler tools. n8n lets you keep the “logic layer” close to the data, which matters when you’re filtering product types and building a clean report. If you only need a basic “send me an email when stock is low” for a handful of SKUs, Zapier or Make can be quicker. But as soon as you care about sources, formatting, and daily reporting, n8n tends to be the calmer option. If you want a second opinion before you build, Talk to an automation expert.

Once this is running, low stock stops being a surprise and becomes a simple daily check-in. The workflow watches Magento. You focus on restocking decisions.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal