01What it does
Spam bots love open channels and groups. Once they are in, you have to find them and remove them by hand.
Join requests stop them at the door. When someone asks to join, Telegram does not let them in yet. It creates a pending request. Your bot then writes to that person in a private chat, before they are a member.
The usual use is an emoji CAPTCHA:
- The person presses the right emoji. The bot approves the request, and they are in.
- The person presses wrong or does not answer. The bot declines the request.
Real people get in within seconds. Bots never see your chat.
It works for both channels and groups.
02What you need in Telegram
Set up two things in Telegram before you build the flow:
- Make your bot an admin of the channel or group, with the right to add members (Telegram's "invite users" right).
- Make the chat require approval. Turn on Approve new members for the chat, or share an invite link with Request admin approval turned on.
Without approval, people join straight away and there is no request to check.
03Turn it on
- Open the flow that should check new people.
- Click the Starting Step block, then Add Trigger.
- In Type, pick Join request (channel or group).
The same trigger is also in the Telegram module, under Installed modules, as Telegram - Join Request. Either one works.
From now on, every new request to a chat where your bot is an admin starts this flow. The flow runs in a private chat with the person who asked to join.
Telegram allows this private message for 5 minutes after the request, or until the request is handled. Keep the check short.
04Build the check: CAPTCHA, then approve or decline
A typical flow has three Action blocks after the Starting Step.
- The CAPTCHA. Add an Action block and pick Emoji Captcha. Set Time limit, sec to
300, which is the 5-minute window. You can write your own Intro text (optional), or leave it empty for the default greeting. The In groups settings do nothing here, because the check happens in a private chat. - Approve. Connect the CAPTCHA block's Next output to a new Action block. Under Modules, pick Approve Join Request.
- Decline. Connect the CAPTCHA block's Failure output to another Action block. Pick Decline Join Request.
Both actions have the same two fields:
| Field | What to put there |
|---|---|
| Channel or group | The trigger's value join_chat_id. Click {} in the field and pick it. |
| Applicant user ID | Already filled with `{{sysvar |
Approve and decline come from the Telegram module. If you do not see them under Modules, install the Telegram module on the Modules page first. See Modules: Connect Sheets, AI, Payments and More.
To try it, deploy the bot and ask to join the chat from a second Telegram account.
05Values the trigger gives you
The trigger passes these values to the rest of the flow. Pick them with {} in any field, for example to greet the person by name or to tell them which chat they asked to join.
| Value | What it holds |
|---|---|
join_chat_id | The ID of the channel or group they asked to join |
join_chat_title | Its name |
join_chat_username | Its @username, if it has one |
join_chat_type | Whether it is a channel or a group |
member_user_id | The Telegram ID of the person |
member_username | Their @username |
member_first_name | Their first name |
member_last_name | Their last name |
join_request_bio | The bio from their profile |
invite_link | The invite link they used |
date | When they sent the request |
06What it does not do
- Telegram only. Other channels have no join requests.
- Old requests are not sent again. Requests that were already waiting before your bot started receiving join requests do not reach the flow. Approve or decline those by hand in Telegram.
- No messages after the window. If the person does not answer within 5 minutes, the bot cannot write to them any more. The CAPTCHA time limit of 300 seconds sends them down the Failure path, so the request is declined.
- A declined person is not banned. They can ask to join again, and the check runs again.
- Requests handled by hand. If an admin approves or declines a request in Telegram first, the bot's approve or decline action fails.
- A sleeping bot is a little slower. Bots that have been idle for a while go to sleep. A join request wakes the bot up, so the first message can take a few extra seconds.
- People who are already members. Join requests only cover people who are not in the chat yet. To check new members of a group, use the New chat member trigger with an Emoji Captcha, and set When attempts run out to Remove from the group. That does not work in channels: subscribers cannot write there, so they cannot answer a CAPTCHA. This is why join requests exist.
07Next up
Your check is ready. Now make it live: Test and Deploy Your Bot.
