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
- Click the Download button on this page to get the workflow file.
Step 2: Import the Workflow
- Inside the n8n editor, click on the menu and select “Import from File.”
- Choose the downloaded workflow file to import it into your workspace.
Step 3: Configure Credentials
- Open the imported workflow.
- Add your Telegram Bot API credentials in the Telegram nodes so they can connect properly.
Step 4: Update Identifiers
- 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
- Test the workflow by adding or removing a user in your group to confirm the messages send correctly.
Step 6: Activate for Production
- 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.
