Automate Telegram Welcome and Farewell Messages with n8n

This n8n workflow automates personalized welcome and farewell messages in Telegram groups by detecting new chat members and departures, saving time manually managing community interactions.
telegram
if
telegramTrigger
Workflow Identifier: 2491
NODES in Use: TelegramTrigger, IF, Telegram

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow watches for new or leaving members in a Telegram group.

When someone joins, it sends a welcome message with their first name.

When someone leaves, it sends a goodbye message naming them.

All messages go to a chosen Telegram chat using a bot instantly.

This helps keep the community friendly and saves manual work.


Tools and Services Used

  • n8n Platform: To build and run the automation.
  • Telegram Bot API: To get member join/leave events.
  • Telegram Trigger node: Listens for Telegram updates.
  • Telegram node: Sends messages to group chat.

Inputs, Processing Steps, and Output

Inputs

  • Updates from Telegram bot about group membership changes.

Processing Steps

  • The Telegram Trigger node listens for all updates.
  • One IF node checks if a new member is present in the update.
  • Another IF node checks if a member left the chat.
  • Depending on these checks, Telegram nodes send welcome or farewell messages.

Output

  • Real-time messages posted in the Telegram group chat whenever a member joins or leaves.

Beginner Step-by-step: How to Use This Workflow in n8n

Step 1: Download the Workflow

  1. Click the Download button on this page to get the workflow file.

Step 2: Import the Workflow

  1. Inside the n8n editor, click on the menu and select “Import from File.”
  2. Choose the downloaded workflow file to import it into your workspace.

Step 3: Configure Credentials

  1. Open the imported workflow.
  2. Add your Telegram Bot API credentials in the Telegram nodes so they can connect properly.

Step 4: Update Identifiers

  1. Check the Chat ID field in the Telegram nodes; update it with your actual group chat username (for example, @yourgroup).

Step 5: Test the Workflow

  1. Test the workflow by adding or removing a user in your group to confirm the messages send correctly.

Step 6: Activate for Production

  1. Turn the workflow toggle to active inside n8n to run it continuously.

If using self-host n8n, see self-host n8n for more ways to control and scale your automation.


Step-by-Step Guide to Build This Workflow (Summary)

Step 1: Setup Telegram Trigger Node

Add the Telegram Trigger node.

Set it to receive all updates (“*”).

Configure the webhook URL in the Telegram bot.

Step 2: Add IF Nodes for Conditions

Create IF node named “Saludos-IF” to check if there is a new member joining.

= {{$node["Saludos-TelegramTrigger"].json["message"]["new_chat_member"]["first_name"]}}

Set condition “isEmpty”.

Create second IF node “Saludos-IF1” to check if a member left.

= {{$node["Saludos-TelegramTrigger"].json["message"]["left_chat_member"]["first_name"]}}

Set condition “isEmpty”.

Step 3: Connect IF Node Outputs to Telegram Nodes

False branch from “Saludos-IF” connects to Telegram node for welcome messages.

False branch from “Saludos-IF1” connects to Telegram node for farewell messages.

Step 4: Configure Telegram Nodes

Set welcome node’s message text:

= ✔️ {{$node["Saludos-TelegramTrigger"].json["message"]["new_chat_member"]["first_name"]}}, ¡bienvenid@ a N8N en Españoll! 🙌

Set farewell node’s message text:

= ✖️ {{$node["Saludos-TelegramTrigger"].json["message"]["left_chat_member"]["first_name"]}} DEP. 🙏 Que los Dioses te protejan.

Use correct chat ID in both nodes.


Customization Ideas

  • Change welcome message wording in the welcome Telegram node.
  • Add Telegram username to messages using JSON path.
  • Send private messages by adding extra Telegram node with direct chat IDs.
  • Post greetings to more groups by duplicating Telegram nodes and changing chat IDs.
  • Record member joins and leaves by adding database or Google Sheets nodes.

Troubleshooting

Issue: Webhook not firing for Telegram updates.

Reason: The Telegram webhook is not set or expired.

Fix: Reset webhook URL in Telegram Botfather with current n8n webhook; test again.

Issue: Messages do not send to the group.

Reason: Chat ID is wrong or bot lacks admin rights.

Fix: Check chat ID format like @groupchat and make sure bot is admin.

Issue: IF nodes have errors with JSON paths.

Reason: Telegram message structure varies by event type.

Fix: Inspect actual Telegram update JSON and adjust the paths in IF nodes accordingly.


Pre-Production Checklist

  • Confirm Telegram bot permissions and admin status in Telegram group.
  • Check the Telegram Trigger node receives join and leave updates properly.
  • Ensure IF nodes correctly detect new versus leaving members.
  • Verify Telegram nodes send messages successfully to the group.
  • Back up all workflow files before changing them.

Deployment Guide

Turn the workflow toggle to active when ready in n8n.

The Telegram Trigger will continuously watch for membership changes.

Check n8n execution logs often to find and fix any errors.


Summary

✓ Saves hours of sending welcome and farewell messages manually.

✓ Sends timely and personal messages mentioning member names.

✓ Keeps Telegram community friendly and engaged automatically.

→ Easy to import, configure, test, and activate in n8n.

→ Customizable message text, chat targets, and data logging.


Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free