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
Automate Telegram messages with n8n and Telegram

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

Learn how to Build this Workflow with AI:

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.


Automate Telegram messages with n8n and Telegram

Visit through Desktop to Interact with the Workflow.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.