🔓 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 22, 2026

Magento to Telegram, promo alerts without duplicates

Lisa Granqvist Partner Workflow Automation Expert

Your Telegram channel goes quiet, then suddenly you remember you meant to post that new product. Or worse, you post the same coupon twice and people start ignoring your “urgent” messages. That’s why Magento Telegram alerts can’t be “when someone has time.”

E-commerce managers feel it first because promos have a shelf life. But store owners running lean teams get hit too, and marketers trying to build a consistent community end up babysitting posts instead of planning campaigns.

This n8n workflow monitors Magento 2 for new products and coupons, formats a clean Telegram post, and uses MySQL to prevent repeats. You’ll see how the automation works, what you need, and the practical results you can expect.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Magento to Telegram, promo alerts without duplicates

The Problem: Promo posts get missed (or repeated)

Posting new arrivals and coupon drops sounds simple until you’re living inside the day-to-day chaos of an online store. Someone has to check Magento, copy a product name, grab a price, find an image, paste a link, write a message, and then do it again for coupons. The “quick post” turns into a distracting mini-project. And when it’s manual, duplicates sneak in. You either annoy subscribers with repeat alerts or you stop posting entirely because it feels messy and risky.

It adds up fast. Here’s where it breaks down in real stores:

  • You lose the first few hours of momentum after a product goes live because nobody is watching Magento at the right time.
  • Duplicate coupon posts happen when two people promote the same rule, or when you forget what was already shared last week.
  • Formatting is inconsistent, which means links get buried and images are forgotten (the exact things that drive taps).
  • You end up relying on “tribal knowledge” in Slack or a note somewhere instead of a system that scales with your catalog.

The Solution: Scheduled Magento monitoring + duplicate-proof Telegram posts

This workflow runs on a schedule (by default, once per hour) and checks Magento for two things: newly available products and the latest voucher/coupon rules exposed via the Magento REST API. When it finds something new, it records the item in a MySQL table, checks if it has been posted before, and only continues if it’s truly new. Then it pulls the details it needs (like product name, price, URL, images, or coupon status and usage limits), formats a tidy message with Markdown, and publishes it to Telegram automatically. After a successful post, it updates MySQL so the same product or coupon can’t be sent again by accident.

The workflow starts with a scheduled trigger and initializes the tracking table in MySQL. From there it runs two tracks: one for vouchers and one for products, each with a “duplicate check → validate status → format → post” pattern. Finally, it marks the item as posted so your channel stays clean.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you run 2 promo pushes a day (one new product, one coupon) and you post them to Telegram manually. If each post takes about 15 minutes to collect details, grab an image, format the message, and double-check you didn’t already share it, that’s about 30 minutes daily. This workflow turns that into a scheduled check plus automated posting, so your “time spent” drops to maybe 5 minutes a week to review the channel and tweak copy when needed. The posts still go out even when you’re busy with support tickets.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Magento 2 REST API access for products and coupon rules
  • Telegram Bot to publish into your channel
  • MySQL database credentials (create a user with INSERT/SELECT)

Skill level: Intermediate. You’ll paste API credentials, map a few fields, and run a quick MySQL table setup.

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

How It Works

Scheduled check runs automatically. The workflow starts with a Schedule Trigger (set to every hour by default). It also runs a MySQL “initialize table” step so tracking exists even if you deploy this on a fresh database.

Magento data is pulled for coupons and products. It calls Magento over HTTP Request to retrieve the latest voucher/coupon info and new product data. Each item gets inserted into MySQL first so you have a record of what the workflow has seen.

Duplicates and inactive items get filtered out. Two separate If checks handle “already posted?” and “is this valid/active?” so you don’t promote dead coupons or unavailable products. Frankly, this is where most DIY automations fall apart because they skip the boring guardrails.

Messages are formatted and posted. A code step formats a Markdown message (product name, price, image, link, or coupon code with usage/status details), then Telegram sends it to your channel. The workflow can also publish to X/Twitter, but Telegram is the core output.

You can easily modify the schedule (hourly to every 15 minutes) or the message template (short vs. detailed) based on your needs. 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 regular interval so new vouchers and products are checked automatically.

  1. Add and open Scheduled Automation Start.
  2. Set the schedule rule to run every hour by configuring RuleInterval with Field set to hours.
  3. Confirm Scheduled Automation Start outputs to Retrieve Latest Voucher, Initialize Storage Table, and Retrieve New Product in parallel.

Tip: The trigger starts three parallel branches, so ensure downstream nodes can handle simultaneous execution.

Step 2: Connect Database Storage (MySQL)

Initialize and update the storage table used to prevent duplicate postings.

  1. Open Initialize Storage Table and set Operation to executeQuery.
  2. Set Query to CREATE TABLE IF NOT EXISTS posted_items (item_id INT PRIMARY KEY, item_type ENUM('product', 'coupon') NOT NULL, item_value VARCHAR(255), posted BOOLEAN DEFAULT FALSE, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);.
  3. In Insert Voucher Record and Insert Product Record, keep Operation as executeQuery and preserve the SQL that inserts new items and selects the current row.
  4. In Mark Voucher Posted and Mark Product Posted, keep Query set to the update statements using {{$('Retrieve Latest Voucher').item.json.items[0].rule_id}} and {{$('Validate Product Status').item.json.id}}.
  5. Credential Required: Connect your MySQL credentials to all database nodes (5 nodes handle table initialization, inserts, and status updates).

⚠️ Common Pitfall: If the database user lacks CREATE or UPDATE permissions, Initialize Storage Table and the “Mark Posted” nodes will fail.

Step 3: Connect Voucher and Product Data Sources

Pull the latest voucher and product data from your store’s API endpoints.

  1. Open Retrieve Latest Voucher and set URL to {{$vars.STORE}}/rest/V1/coupons/search?searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC&searchCriteria[pageSize]=1.
  2. Set Authentication to genericCredentialType and Generic Auth Type to httpHeaderAuth in Retrieve Latest Voucher.
  3. Open Retrieve New Product and set URL to {{$vars.STORE}}rest/V1/products?searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC.
  4. Set Authentication to headerAuth and enable Allow Unauthorized Certs if required in Retrieve New Product.
  5. Open Fetch Rule Details and set URL to https://magekwik.com/rest/V1/salesRules/{{$json.item_id}}.
  6. Open Fetch Product Details and set URL to https://your-website.com/rest/default/V1/products/{{$json.item_value}}.
  7. Credential Required: Connect your HTTP Header Auth credentials to Retrieve Latest Voucher, Fetch Rule Details, and Fetch Product Details.
  8. Credential Required: Connect your Header Auth credentials to Retrieve New Product.

Tip: Verify the $vars.STORE variable is defined in your n8n environment so API URLs resolve correctly.

Step 4: Configure Duplicate Checks and Status Validation

Prevent reposting the same item and ensure only active items are announced.

  1. Open Voucher Duplicate Check and confirm the condition checks Left Value {{$json.posted}} equals 1 with loose type validation.
  2. Open Product Duplicate Check and confirm the condition checks Left Value {{$json.posted}} equals 1.
  3. In Validate Voucher Status, verify the boolean true check uses {{$json.is_active}}.
  4. In Validate Product Status, verify the status/active check compares {{$json.status}} and {{$json.is_active}}.
  5. Confirm the flow continues from Fetch Rule DetailsValidate Voucher StatusFormat Voucher Message, and from Fetch Product DetailsValidate Product StatusFormat Product Message.

Step 5: Set Up Message Formatting

Format the alert content for Telegram and X using the code nodes.

  1. Open Format Voucher Message and keep the JavaScript Code as-is to generate the coupon text from Retrieve Latest Voucher and Fetch Rule Details.
  2. Open Format Product Message and keep the JavaScript Code that builds message and image from product data.
  3. Confirm the execution splits in parallel: Format Voucher Message outputs to both Send Voucher to Telegram and Publish Voucher to X in parallel.
  4. Confirm the execution splits in parallel: Format Product Message outputs to both Send Product to Telegram and Publish Product to X in parallel.

Step 6: Configure Telegram and X Publishing

Deliver the formatted alerts to Telegram and X, then mark items as posted.

  1. Open Send Voucher to Telegram and set Text to {{$json.coupon}}; add your Telegram Chat ID.
  2. Open Publish Voucher to X and set Text to {{$json.coupon}}. Note the node is disabled by default; enable it when ready.
  3. Open Send Product to Telegram and set Operation to sendMediaGroup with Media set to {{$json.image}} and Caption to {{$json.message}}; add your Telegram Chat ID.
  4. Open Publish Product to X and set Text to {{$json.image}} {{$json.message}}.
  5. Confirm Send Voucher to Telegram and Publish Voucher to X both flow into Mark Voucher Posted, and Send Product to Telegram and Publish Product to X both flow into Mark Product Posted.
  6. Credential Required: Connect your Telegram Bot credentials to Send Voucher to Telegram and Send Product to Telegram.
  7. Credential Required: Connect your Twitter credentials to Publish Voucher to X and Publish Product to X.

⚠️ Common Pitfall: If Publish Voucher to X remains disabled, only Telegram will post and Mark Voucher Posted will still run via the Telegram branch.

Step 7: Test and Activate Your Workflow

Run a manual test to confirm data retrieval, posting, and database updates before enabling the schedule.

  1. Click Execute Workflow to run Scheduled Automation Start once.
  2. Verify that new items flow through Retrieve Latest Voucher and Retrieve New Product, and that Insert Voucher Record and Insert Product Record return rows.
  3. Confirm messages are posted via Send Voucher to Telegram and Send Product to Telegram, and check X posts if Publish Voucher to X or Publish Product to X are enabled.
  4. Check the database to confirm Mark Voucher Posted and Mark Product Posted set posted = 1.
  5. When successful, switch the workflow to Active to run on the schedule.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Magento API credentials can expire or lack access to coupon rules. If calls fail, check your Magento integration token/permissions and confirm the REST endpoint exposes rule details.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Telegram bot posting fails surprisingly often because the bot isn’t an admin in the channel yet. Add the bot to the channel first, then re-check the chat/channel ID in n8n.

Frequently Asked Questions

How long does it take to set up this Magento Telegram alerts automation?

About an hour if your Magento API and Telegram bot are ready.

Do I need coding skills to automate Magento Telegram alerts?

No. You’ll connect Magento, Telegram, and MySQL, then adjust a few fields. The only “technical” part is pasting credentials and testing one run.

Is n8n free to use for this Magento Telegram alerts 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 your hosting and database costs (MySQL is often included with your server).

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 Telegram alerts workflow for posting only products (no coupons)?

Yes, but you’ll want to disable the voucher branch cleanly. In n8n, you can turn off the “Retrieve Latest Voucher” path (and its related duplicate check, formatting, and Telegram send nodes) while keeping the product nodes active. Common customizations include changing the schedule to every 15 minutes during launches, shortening the Telegram message to one line plus link, or adding extra fields like category and stock status so subscribers get better context.

Why is my Telegram connection failing in this workflow?

Usually the bot isn’t allowed to post in the channel yet. Add the bot to the channel, make it an admin, then confirm you’re using the correct chat ID in n8n. If it still fails, regenerate the bot token in BotFather and update the Telegram credentials in n8n.

How many products and coupons can this Magento Telegram alerts automation handle?

A lot, as long as your Magento API and database can keep up.

Is this Magento Telegram alerts automation better than using Zapier or Make?

Often, yes, because duplicate prevention is the whole point here and n8n handles that logic (with MySQL checks, branching, and “mark as posted” updates) without feeling like you’re fighting the tool. Zapier and Make can do it, but the database-style tracking usually means extra steps, extra cost, and more fragile logic once you add both coupons and products. n8n also gives you the option to self-host, which is useful if you’re checking hourly forever. If you only need a simple “new product → send message” flow, those tools can be quicker to start. If you’re unsure, Talk to an automation expert and get a recommendation based on your volume.

Once this is running, your Telegram channel stays timely without becoming another daily task. Set it up, let MySQL prevent repeats, and get your promos out while they still matter.

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