📱
Communication ToolsSimple88% users use

Telegram Integration

Real-time notifications, bot control - Master Telegram automation for communication and messaging workflows

25 minutes
(4.8)
by n8n Academy
Telegram Bot APINotificationsMessagingBot Development
Updated 12 hours ago

Common Use Cases

🔔

Message Notifications

Automated alerts, system notifications, and status updates

Simple
👥

Group Management

Automated moderation, user management, and group analytics

Medium
🤖

Auto-reply

Intelligent chatbots and automated response systems

Medium
📰

News Broadcasting

Automated news distribution and content sharing

Simple
🎧

Customer Support

Support ticket creation and customer service automation

Medium
⚠️

Monitoring Alerts

System monitoring, error alerts, and status notifications

Simple

Telegram Bot API Features

FeatureDescriptionMethodEndpoint
Send MessageSend text messages to users, groups, or channelsPOST/sendMessage
Send PhotoSend images and photos with optional captionsPOST/sendPhoto
Send DocumentSend files and documents to recipientsPOST/sendDocument
Get UpdatesReceive incoming messages and updatesGET/getUpdates

Prerequisites

Telegram account for bot creation
BotFather access for bot token generation
n8n instance (cloud or self-hosted)
Understanding of webhook concepts
Basic knowledge of messaging workflows

What You'll Learn

Automated message sending and broadcasting
Real-time notification systems
Interactive bot command handling
Group and channel management
Media file sharing and attachments
Custom keyboard and inline buttons
User interaction tracking
Message formatting and styling
Webhook-based real-time updates
Integration with external services

Tutorial Sections

1

Telegram Bot Setup & Configuration

Create and configure Telegram bots for automation

8 minutes
  • Creating a new bot with BotFather
  • Obtaining bot token and configuring permissions
  • Setting up webhook endpoints for real-time updates
  • Understanding Telegram Bot API capabilities
  • Testing bot connectivity and basic commands
2

Message Notifications

Automate alert and notification systems

10 minutes
  • Setting up automated alert workflows
  • Custom message formatting and styling
  • Media attachments and file sharing
  • Group and channel message broadcasting
  • Conditional notification triggers
  • Message scheduling and delayed delivery
3

Group Management & Auto-reply

Build intelligent group management systems

7 minutes
  • Automated group moderation and management
  • Smart auto-reply systems and chatbots
  • User interaction and command handling
  • Group analytics and activity monitoring
  • Integration with external data sources

Practical Example: System Monitoring Alert Bot

1

Monitor Trigger

System monitoring detects an issue or threshold breach

2

Alert Processing

Format alert message with relevant details and severity

3

Telegram Notification

Send formatted alert to designated Telegram channels

4

Response Handling

Process team responses and update monitoring system

Quick Bot Setup Guide

1. Create Bot with BotFather

Start a chat with @BotFather on Telegram and use these commands:

/newbot
YourBotName
YourBotUsername_bot

2. Get Bot Token

BotFather will provide a token like:

123456789:ABCdefGHIjklMNOpqrsTUVwxyz

3. Configure in n8n

Add the token to your n8n Telegram node configuration.

Sample Telegram Message API Call

// Send message to Telegram
{
  "chat_id": "{{$json.chat_id}}",
  "text": "🚨 *Alert: {{$json.alert_type}}*\n\n" +
         "📊 *System:* {{$json.system_name}}\n" +
         "⏰ *Time:* {{$json.timestamp}}\n" +
         "📝 *Details:* {{$json.description}}\n\n" +
         "🔗 [View Dashboard]({{$json.dashboard_url}})",
  "parse_mode": "Markdown",
  "disable_web_page_preview": true
}

This example shows how to send a formatted alert message with Markdown styling.

🚀 Master Telegram Integration!

Start this comprehensive tutorial and build powerful Telegram automation workflows!