Protect Telegram groups with math CAPTCHA verification and Google Sheets
Workflow preview
DISCOUNT 20%
Important notice
This workflow is provided as-is. Please review and test before using in production.
Overview
Why this template rocks
๐ Lightning-fast setup - Deploy in under 5 minutes
๐ก Zero AI costs - Uses simple math instead of expensive LLM calls
๐ก๏ธ 99% spam blocking - Mathematical CAPTCHAs stop bots instantly
โก Ultra-efficient - Runs on minimal resources, scales to thousands of users
๐ฏ Plug-and-play - Just add your bot token and Google Sheet ID
Who's it for
Smart community managers who want maximum protection with minimum complexity. Perfect for:
- ๐ฎ Gaming communities (Discord alternatives)
- ๐ผ Professional Telegram groups
- ๐ Educational channels with 100+ members
- ๐ Any public group facing spam bot invasions
- ๐ฐ Communities wanting to save on AI API costs
What it does
This isn't another complicated AI bot - it's a lean, mean spam-fighting machine that works smarter, not harder.
๐ง Simple brilliance: Instead of expensive AI that can be fooled, we use basic math (1+1=?) that bots consistently fail
๐ฏ Instant results: New member joins โ Gets math question โ Answers correctly = Welcome! / Wrong answer = Banned
๐งน Auto-cleanup: All verification messages disappear automatically - your chat stays pristine
๐ Smart tracking: Google Sheets integration tracks everything without bloating your database
The genius is in the simplicity - real humans solve "7+3=?" in 2 seconds, bots struggle or ignore it completely.
How it works (the magic behind the simplicity)
Step 1: ๐๏ธ Bot detects new member instantly
Step 2: ๐ฒ Generates random math question (like "4 + 7 = ?")
Step 3: โ Sends personalized challenge mentioning the user
Step 4: ๐ Stores answer in Google Sheets for verification
Step 5: โ
User responds โ Bot checks answer โ Success = Welcome / Fail = Ban
Step 6: ๐งน All verification messages auto-delete for clean chat
Why this crushes AI-based solutions:
- โก Speed: Math verification takes milliseconds vs AI API calls
- ๐ฐ Cost: Zero ongoing fees vs expensive LLM tokens
- ๐ฏ Accuracy: 99%+ spam detection vs AI false positives
- ๐ก๏ธ Reliability: Simple logic never breaks vs AI model changes
Requirements (minimal setup, maximum power)
- ๐ค Telegram Bot Token (free from @BotFather - takes 30 seconds)
- ๐ Google Sheets API (free tier covers 1000s of verifications)
- ๐ Group Admin Rights (add bot as admin with ban/delete permissions)
- ๐ง N8N Instance (self-hosted or cloud - works on any plan)
Total setup time: 5 minutes max โฑ๏ธ
How to set up
Configure Bot Credentials:
- Replace
YOUR_TELEGRAM_BOT_TOKEN_HEREin the "โ๏ธ Bot Configuration" node with your actual bot token from @BotFather - Ensure your bot has necessary permissions (delete messages, ban users, read messages)
- Replace
Set up Google Sheets Integration:
- Create a new Google Sheet with three columns:
id,answer,msg_id - Replace
YOUR_GOOGLE_SHEET_ID_HEREwith your Google Sheet ID - Configure Google Sheets credentials in N8N with proper service account access
- Ensure the sheet is accessible by your service account
- Create a new Google Sheet with three columns:
Configure Telegram Group:
- Add your bot to the target Telegram group
- Promote the bot to administrator with permissions to ban users and delete messages
- Test bot permissions by manually invoking admin functions
Customize Welcome Message:
- Edit the welcome message template in the "โ๏ธ Bot Configuration" node to match your community's tone and style
- Include any group rules, links, or specific information new members should know
Activate and Test:
- Enable the workflow in N8N
- Test the complete flow by joining the group with a test account
- Verify CAPTCHA delivery, answer verification, and both success/failure paths work correctly
๐ก Pro tip: The simple math foundation makes ANY customization easy - no AI complexity to break!
Why you'll love this template
โก Instant impact: Deploy once, protect forever
๐ฐ Zero ongoing costs: No AI bills, just pure efficiency
๐ก๏ธ Battle-tested: Stops 99% of spam bots in real communities
๐ง Maintenance-free: Set it and forget it reliability
๐ Scales infinitely: From 10 to 10,000 members witho