Skip to main content

Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection

Workflow preview

Workflow preview
100%
Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Boost Sales with Automated Magento 2 Product and Coupon Notifications This n8n workflow automatically posts new Magento products & coupons to Telegram while preventing duplicates. Key benefits: I...

Best for

  • Social Media automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.telegram, n8n-nodes-base.mysql, n8n-nodes-base.code, n8n-nodes-base.twitter, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Kanaka Kishore Kandregula.

Original n8n.io source

1.1 Workflow description

Title
Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection
Workflow name
Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection

Boost Sales with Automated Magento 2 Product and Coupon Notifications

This n8n workflow automatically posts new Magento products & coupons to Telegram while preventing duplicates. Key benefits:

✅ Increase conversions with time-sensitive alerts (creates urgency)

✅ Reduce missed opportunities with 24/7 monitoring

✅ Improve customer engagement through rich media posts

✅ Save hours per week by automating manual posting

Why This Works:

  1. Triggers impulse buys with real-time notifications

  2. Eliminates human error in duplicate posting

  3. Scales effortlessly as your catalog grows

  4. Provides analytics through database tracking

Perfect for e-commerce stores wanting to:

  • Announce new arrivals instantly

  • Promote limited-time offers effectively

  • Maintain consistent social presence

  • Track performance through MySQL

This workflow automatically:

✅ Detects new products AND coupons in Magento

✅ Prevents duplicate postings with MySQL tracking

✅ Posts rich formatted alerts to Telegram

✅ Runs on a customizable schedule

✨ Key Features

For Products:

  • Product name, price, and image

  • Direct store link

  • Media gallery support

For Coupons:

  • Coupon code and status

  • Usage limits (times used/available)

  • Active/inactive status indicator

Core System:

🔒 MySQL duplicate prevention⏰ 1-hour schedule (customizable)📱 Telegram notifications with Markdown

🛠️ Configuration Guide

Database Setup

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

Required Credentials

  1. Magento API (HTTP Header Auth)

  2. MySQL Database

  3. Telegram Bot

Sticky Notes

`❗ IMPORTANT SETUP NOTES ❗

  1. For products: Ensure 'url_key' exists in custom_attributes

  2. For coupons: Magento REST API must expose coupon rules

  3. MySQL user needs INSERT/SELECT privileges

  4. Telegram bot must be added to your channel first

🔄 SCHEDULING: - Default: Checks every 1 hours at :00 - Adjust in Schedule Trigger node `

⚙️ Technical Details

Workflow Logic:

  1. Checks for new products/coupons via Magento API

  2. Verifies against MySQL database

  3. Only posts if record doesn't exist

  4. Updates database after successful post

Error Handling:

  • Automatic skip if product/coupon exists

  • Empty result handling

  • Connection timeout protection

🌟 Why This Template?

  • Complete Solution: Handles both products AND coupons

  • Battle-Tested: Prevents all duplicates reliably

  • Ready-to-Use: Just add your credentials

  • Fully Customizable: Easy to modify for different needs

Perfect for e-commerce stores using Magento 2 who want automated, duplicate-free social notifications!

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - Get Rule Info

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Coupon Status

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 4 - Post to Telegram1

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1

Block 5 - Product Alert to Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1

Block 6 - Init Database

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 7 - Fetch New Product

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 1

Block 8 - Get Product Info

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Set Coupon as Posted

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 10 - Set Product as Posted

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 11 - Get Latest Offer

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Product Message Format

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Voucher Message Format

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - New Voucher Entry

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 15 - New Product Entry

Type / Role
n8n-nodes-base.mySql - mySql
Config choices
Version 2.4

Block 16 - Product Status

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 17 - Voucher to X

Type / Role
n8n-nodes-base.twitter - twitter
Config choices
Version 2

Block 18 - Product X Post

Type / Role
n8n-nodes-base.twitter - twitter
Config choices
Version 2

Block 19 - Voucher Duplication Protection

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 20 - Product Duplication Protection

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 21 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 27 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection
Complexity advanced
Nodes 27
Categories Social Media
Author Kanaka Kishore Kandregula
Published 11 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5893/5893.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automatic Magento 2 product & coupon alerts to Telegram with duplicate protection do?

Boost Sales with Automated Magento 2 Product and Coupon Notifications This n8n workflow automatically posts new Magento products & coupons to Telegram while preventing duplicates. Key benefits: I...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media use case.