Back to Catalog

Protect Telegram groups with math CAPTCHA verification and Google Sheets

Vadym NahornyiVadym Nahornyi
36 views
2/3/2026
Official Page

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

  1. Configure Bot Credentials:

    • Replace YOUR_TELEGRAM_BOT_TOKEN_HERE in the "โš™๏ธ Bot Configuration" node with your actual bot token from @BotFather
    • Ensure your bot has necessary permissions (delete messages, ban users, read messages)
  2. Set up Google Sheets Integration:

    • Create a new Google Sheet with three columns: id, answer, msg_id
    • Replace YOUR_GOOGLE_SHEET_ID_HERE with your Google Sheet ID
    • Configure Google Sheets credentials in N8N with proper service account access
    • Ensure the sheet is accessible by your service account
  3. 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
  4. 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
  5. 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

Telegram Group Math Captcha Verification with Google Sheets

This n8n workflow automates the process of verifying new users joining a Telegram group using a math captcha and records their verification status in Google Sheets. This helps prevent bots and unwanted users from joining your Telegram groups.

What it does

This workflow streamlines the user verification process for Telegram groups:

  1. Listens for New Telegram Users: Triggers when a new member joins a specified Telegram group.
  2. Generates Math Captcha: Creates a simple math problem (e.g., "5 + 3 = ?") for the new user.
  3. Sends Captcha to User: Messages the new user privately with the math captcha.
  4. Records User in Google Sheet: Adds the new user's details and their initial "unverified" status to a Google Sheet.
  5. Monitors User Responses: Waits for the user to respond to the captcha.
  6. Verifies Answer: Checks if the user's answer to the captcha is correct.
  7. Updates Google Sheet: Updates the user's status in the Google Sheet to "verified" or "failed" based on their answer.
  8. Grants/Denies Access: If verified, the user is allowed to stay in the group. If not, they might be removed (though the current workflow JSON does not explicitly show a "remove user" action, this is a common extension).

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • Telegram Bot Token: A Telegram bot configured with the necessary permissions to send messages and manage group members.
  • Google Account: A Google account with access to Google Sheets to store user data.
  • Google Sheets Spreadsheet: A Google Sheet set up with columns to record user ID, username, captcha question, correct answer, user's answer, and verification status.

Setup/Usage

  1. Import the Workflow:
    • Copy the provided JSON code.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the "Import from JSON" button and paste the copied JSON.
  2. Configure Credentials:
    • Telegram Trigger: Set up your Telegram Bot credential. Ensure your bot is added to your target Telegram group and has admin rights to see new member events.
    • Telegram Node: Use the same Telegram Bot credential.
    • Google Sheets Node: Set up your Google Sheets credential, granting n8n access to your spreadsheet.
  3. Customize Nodes:
    • Telegram Trigger (Node 50): Ensure it's listening for New Member events in your desired Telegram group.
    • Code (Node 834): This node likely contains the logic for generating the math captcha. Review and adjust the math problem generation as needed.
    • Telegram (Node 49): Configure the messages sent to the user for the captcha.
    • Google Sheets (Node 18): Specify your Spreadsheet Name and Sheet Name. Ensure the column names in the workflow match your Google Sheet's header row.
    • If (Node 20): This node will contain the logic to check if the user's captcha answer is correct. Adjust the conditions if you change the captcha generation logic.
    • Edit Fields (Set) (Node 38): This node is used to prepare data for Google Sheets. Adjust fields as necessary to match your sheet's structure.
  4. Activate the Workflow: Once configured, activate the workflow to start monitoring your Telegram group.

This workflow provides a robust foundation for securing your Telegram groups. You can extend it further by adding actions to automatically kick users who fail the captcha or implement more complex verification methods.

Related Templates

AI-powered code review with linting, red-marked corrections in Google Sheets & Slack

Advanced Code Review Automation (AI + Lint + Slack) Whoโ€™s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting โ€” all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0โ€“10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your teamโ€™s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow โ€” reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why itโ€™s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n โ€” combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your teamโ€™s review history transparent and centralized.

higashiyama By higashiyama
90

Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution

AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) ๐Ÿง  AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative โ€” all powered by AI logic, sir. --- ๐Ÿ’ก Key Advantages โšก Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. ๐Ÿง  AI Qualification Engine An OpenAI-powered Agent evaluates the leadโ€™s industry, region, and needs to generate a persona summary and routing rationale. ๐Ÿ“Š Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. ๐Ÿ’ฌ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. ๐Ÿ” Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- โš™๏ธ How It Works HubSpot Trigger โ€“ Captures a new lead as soon as itโ€™s created in HubSpot. Fetch Contact Data โ€“ Retrieves all relevant fields like name, company, and industry. Clean & Format Data โ€“ A Code node standardizes and structures the data for consistency. Airtable Record Creation โ€“ Logs the lead data into the โ€œLeadsโ€ table for centralized tracking. AI Agent Qualification โ€“ The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update โ€“ Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification โ€“ Sends a real-time message tagging the rep with lead info. Gmail Notification โ€“ Sends a personalized handoff email with context and follow-up actions. HubSpot Sync โ€“ Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- ๐Ÿ› ๏ธ Setup Steps Trigger Node: HubSpot โ†’ Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the โ€œLeadsโ€ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- ๐Ÿ” Credentials Required HubSpot OAuth2 API โ€“ To fetch and update leads. Airtable Personal Access Token โ€“ To store and update lead data. OpenAI API โ€“ To power the AI qualification and matching logic. Slack OAuth2 โ€“ For sending team notifications. Gmail OAuth2 โ€“ For automatic email alerts to assigned reps, sir. --- ๐Ÿ‘ค Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- ๐Ÿ’ฌ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular โ€” perfect for scaling across global sales teams, sir.

MANISH KUMARBy MANISH KUMAR
113

Track daily moods with AI analysis & reports using GPT-4o, Data Tables & Gmail

Track your daily mood in one tap and receive automated AI summaries of your emotional trends every week and month. Perfect for self-reflection, wellness tracking, or personal analytics. This workflow logs moods sent through a webhook (/mood) into Data Tables, analyzes them weekly and monthly with OpenAI (GPT-4o), and emails you clear summaries and actionable recommendations via Gmail. โš™๏ธ How It Works Webhook โ€“ Mood โ†’ Collects new entries (๐Ÿ™‚, ๐Ÿ˜, or ๐Ÿ˜ฉ) plus an optional note. Set Mood Data โ†’ Adds date, hour, and note fields automatically. Insert Mood Row โ†’ Stores each record in a Data Table. Weekly Schedule (Sunday 20:00) โ†’ Aggregates the last 7 days and sends a summarized report. Monthly Schedule (Day 1 at 08:00) โ†’ Aggregates the last 30 days for a deeper AI analysis. OpenAI Analysis โ†’ Generates insights, patterns, and 3 actionable recommendations. Gmail โ†’ Sends the full report (chart + AI text) to your inbox. ๐Ÿ“Š Example Auto-Email Weekly Mood Summary (last 7 days) ๐Ÿ™‚ 5 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ ๐Ÿ˜ 2 โ–ˆโ–ˆโ–ˆโ–ˆ ๐Ÿ˜ฉ 0 Average: 1.7 (Positive ๐Ÿ™‚) AI Insights: Youโ€™re trending upward this week โ€” notes show that exercise days improved mood. Try keeping short walks mid-week to stabilize energy. ๐Ÿงฉ Requirements n8n Data Tables enabled OpenAI credential (GPT-4o or GPT-4 Turbo) Gmail OAuth2 credential to send summaries ๐Ÿ”ง Setup Instructions Connect your credentials: Add your own OpenAI and Gmail OAuth2 credentials. Set your Data Table ID: Open the Insert Mood Row node and enter your own Data Table ID. Without this, new moods wonโ€™t be stored. Replace the email placeholder: In the Gmail nodes, replace your.email@example.com with your actual address. Deploy and run: Send a test POST request to /mood (e.g. { "mood": "๐Ÿ™‚", "note": "productive day" }) to log your first entry. โš ๏ธ Before activating the workflow, ensure you have configured the Data Table ID in the โ€œInsert Mood Rowโ€ node. ๐Ÿง  AI Analysis Interprets mood patterns using GPT-4o. Highlights trends, potential triggers, and suggests 3 specific actions. Runs automatically every week and month. ๐Ÿ”’ Security No personal data is exposed outside your n8n instance. Always remove or anonymize credential references before sharing publicly. ๐Ÿ’ก Ideal For Personal mood journaling and AI feedback Therapists tracking client progress Productivity or self-quantification projects ๐Ÿ—’๏ธ Sticky Notes Guide ๐ŸŸก Mood Logging Webhook POST /mood receives mood + optional note. โš ๏ธ Configure your own Data Table ID in the โ€œInsert Mood Rowโ€ node before running. ๐ŸŸข Weekly Summary Runs every Sunday 20:00 โ†’ aggregates last 7 days โ†’ generates AI insights + emails report. ๐Ÿ”ต Monthly Summary Runs on Day 1 at 08:00 โ†’ aggregates last 30 days โ†’ creates monthly reflection. ๐ŸŸฃ AI Analysis Uses OpenAI GPT-4o to interpret trends and recommend actions. ๐ŸŸ  Email Delivery Sends formatted summaries to your inbox automatically.

Jose CastilloBy Jose Castillo
105