โœˆ๏ธ Telegram Bot Configuration

Complete guide to integrate Telegram with AI4CALL: send notifications and automatic messages to team or specific users via Telegram bot during or after calls

Telegram Bot Configuration

Go to "MARKET" โ†’ "Marketplace Plugin" and click Buy on "Telegram" โ†’ FREE

Go to "MARKET" โ†’ "My Plugins" and click Configure on "Telegram"

โš ๏ธ Third-party services

The integrations described refer to third-party services.
Rate limits, authentication methods, technical configurations, costs, and policies are defined exclusively by the respective providers and may change over time.

Costs for external services are borne directly by the end user to the service providers themselves and are in no way managed or mediated by our portal (e.g., Meta or other providers for WhatsApp, Zapier, Calendly, etc.).

๐Ÿ’ก Telegram vs WhatsApp: which to choose?
Telegram Bot - ideal for team/internal notifications:

Advantages:
  • โœ… completely FREE - no cost per message
  • โœ… no daily/monthly message limits
  • โœ… free messages - NO pre-approved templates
  • โœ… very quick setup (5 minutes with @BotFather)
  • โœ… native Markdown/HTML formatting support
  • โœ… send photos, documents, files up to 50MB
  • โœ… developer-friendly with open APIs

Disadvantages:
  • โš ๏ธ less widespread among consumer customers (vs WhatsApp)
  • โš ๏ธ some users don't have Telegram installed

When to use Telegram: internal team notifications, urgency alerts, supervisor summaries, B2B communications
When to use WhatsApp: end consumer customer communications (appointment confirmations, orders)

1

What is a Telegram Bot and how it works

A Telegram Bot is an automated account controlled via software through Telegram Bot API that can send/receive messages, manage groups and provide services to users.

๐Ÿค– Telegram Bot characteristics:
Special Telegram account:
โ†’ username ends with "bot" (e.g., @ai4call_assistant_bot)
โ†’ appears as normal contact in Telegram chat
โ†’ can send text messages, photos, files, location, etc.
โ†’ can receive messages from users (if configured)

Programmable control:
โ†’ controlled via HTTP API (Telegram Bot API)
โ†’ no app interface - only code/software
โ†’ authentication via unique Bot Token
โ†’ asynchronous operations - no persistent connection required

Free and unlimited:
โ†’ bot creation: free
โ†’ message sending: free, no cost
โ†’ rate limit: 30 msg/sec global, 1 msg/sec per user
โ†’ no monthly quota, no approval required
๐Ÿ’ก How AI4CALL uses Telegram Bot
Typical workflow:

[Customer calls AI4CALL] โ†“ [AI Assistant handles call] โ†“ [Detects important event: critical problem, urgent request] โ†“ [Assistant invokes send_telegram or send_telegram_bulk] โ†“ [POST to Telegram Bot API with Bot Token] โ†“ [Telegram validates token and recipient] โ†“ [Telegram delivers message] โ†“ [Users receive push notification on smartphone/desktop] โ†“ [Team sees real-time alert on Telegram]
Common use cases:
  • ๐Ÿšจ urgency alerts to technical team
  • ๐Ÿ“Š call summaries to supervisor
  • โœ… operation confirmations to manager
  • ๐Ÿ“ข broadcast announcements to work group
โš ๏ธ Telegram Bot limitations
Telegram Bot CANNOT:
  • โŒ send messages to users who haven't started the bot (never sent /start)
  • โŒ see messages in groups where it's not a member
  • โŒ access private conversations of other users
  • โŒ bypass user block (if user blocks bot, bot cannot contact them)

Key rule: user MUST start conversation with bot (send /start) before bot can send messages. Solution: "Email Invite" system in AI4CALL sends direct link that opens Telegram and starts bot automatically.
2

Create Telegram bot with BotFather

BotFather is the official Telegram bot to create and manage other bots. Creation takes only 5 minutes.

๐ŸŽฏ complete bot creation procedure:
  1. Open Telegram (mobile app, desktop or web.telegram.org)
  2. Search for @BotFather in Telegram search bar
  3. Start conversation: click "START" or send /start
  4. Create new bot: send command /newbot
  5. Choose bot name: BotFather asks for display name
    โ†’ example: AI4CALL Assistant
    โ†’ can contain spaces, emoji, any character
    โ†’ this is the name users will see
  6. Choose bot username: BotFather asks for unique username
    โ†’ MUST end with "bot" (mandatory)
    โ†’ example: ai4call_assistant_bot
    โ†’ only letters, numbers, underscore (no spaces, special characters)
    โ†’ username becomes Telegram handle: @ai4call_assistant_bot
  7. Receive Bot Token: BotFather confirms creation and provides token
    โ†’ format: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz
    โ†’ length ~45 characters
    โ†’ COPY IMMEDIATELY - it's the bot API credential
    โ†’ keep in safe place (password manager)
  8. Configure bot (optional):
    • /setdescription - description shown when user searches for bot
    • /setabouttext - info in bot profile
    • /setuserpic - bot profile photo (square image min 512x512px)
โœ… Bot created successfully!
After creation you should have:
  • โœ… Bot name: e.g., "AI4CALL Assistant"
  • โœ… Bot username: e.g., @ai4call_assistant_bot
  • โœ… Bot Token: long string like 123456789:ABC-DEF...
  • โœ… Bot visible on Telegram - you can search it and start it with /start

Quick test: search for your bot on Telegram, send /start, you should receive confirmation message from BotFather. Bot is ready to be configured in AI4CALL!
๐Ÿ”’ Bot Token security
Bot Token is equivalent to password - grants full control of bot:

Protection:
  • ๐Ÿ”’ DO NOT share publicly (forums, chats, social)
  • ๐Ÿ”’ DO NOT commit to public Git repositories
  • ๐Ÿ”’ keep in company password manager
  • ๐Ÿ”’ if sharing screenshot, censor token

If token compromised:
  1. Open @BotFather
  2. Send /revoke โ†’ select compromised bot
  3. Old token gets invalidated
  4. Send /token โ†’ select bot โ†’ receive new token
  5. Update token in AI4CALL configuration
3

Configure bot in AI4CALL

Insert the Bot Token in AI4CALL to allow the assistant to send Telegram messages.

โš™๏ธ AI4CALL configuration:
  1. Access your assistant's AI4CALL panel
  2. Go to "MCP Integrations" or "MCP Servers" section
  3. Select "Telegram" from the list
  4. In "Telegram Bot" section:
  5. Field "Bot Token": paste the complete token received from @BotFather
    • Format: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz
    • Verify no extra spaces at beginning/end
  6. Click "SAVE CONFIGURATION"
  7. System validates token with Telegram API
  8. If valid: โœ… configuration saved
โœ… Configuration completed
Bot Token configured correctly! Now the assistant can send Telegram messages.

Verification: in AI4CALL dashboard you should see:
  • โœ… Bot Token inserted (masked with asterisks: ************)
  • โœ… Status: "Active configuration" or similar

Next step: add authorized users to allow them to receive messages!
๐Ÿ” Verify bot functionality
Configuration test:

Method 1 - Manual test:
  1. Open Telegram and search for your bot (@ai4call_assistant_bot)
  2. Send /start to the bot
  3. Bot should respond (if you configured responses) or remain silent (normal)

Method 2 - Test from AI4CALL:
  1. Call AI4CALL assistant
  2. Ask: "Send me a test Telegram message"
  3. Assistant should invoke send_telegram
  4. Verify reception on Telegram
Telegram Configuration
"Configure Telegram" panel: Bot Token entry, email invitation, manual user addition, authorized users list
4

Manage authorized users

Configure the list of users who can receive messages from the bot, especially for send_telegram_bulk.

๐Ÿ‘ฅ user addition methods:
METHOD 1 - Manual Addition:
Ideal when you already know Telegram ID or username.

Procedure:
  1. Open Telegram, search for @userinfobot
  2. Send /start
    • Telegram ID: unique numeric ID (e.g., 123456789)
      โ†’ find ID with @userinfobot or @getidsbot on Telegram
      โ†’ permanent, never changes
    • Username: Telegram handle (e.g., @mario_rossi)
      โ†’ optional if providing ID
      โ†’ can change - better to use ID
    • Name: descriptive name for your reference
      โ†’ e.g., "Mario Rossi - Technician"
      โ†’ internal only, not visible in Telegram
  3. Bot responds with your ID: Id: 123456789
  4. User appears in "Authorized Users" list below

METHOD 2 - Email Invitation:
Ideal when user doesn't know their own Telegram ID.

Procedure:
  1. Search for @getidsbot on Telegram
  2. Send any message
  3. Bot responds with ID and other info
  4. User clicks link โ†’ Telegram opens automatically
  5. User sees bot, sends /start
  6. System automatically registers user in authorized list
  7. User receives registration confirmation

Note: system listens for 5 minutes after sending email - no need to keep page open.
๐Ÿ’ก How to find Telegram User ID
3 quick methods:

Method 1 - @userinfobot:
  1. Open Telegram, search for @userinfobot
  2. Send /start
  3. Bot responds with your ID: Id: 123456789

Method 2 - @getidsbot:
  1. Search for @getidsbot on Telegram
  2. Send any message
  3. Bot responds with ID and other info

Method 3 - Telegram Web:
  1. Go to web.telegram.org
  2. Click on your profile
  3. URL contains ID: web.telegram.org/#/im?p=u123456789
๐Ÿ‘ฅ Authorized users list management
"Authorized Users" list shows:
  • ๐Ÿ“Š Total user count (e.g., badge "2" next to "Authorized Users")
  • ๐Ÿ‘ค Numeric Telegram ID of each user
  • โœ๏ธ Descriptive name/username
  • ๐Ÿ—‘๏ธ Trash icon to remove user from list

Usage:
  • send_telegram: can send to ANY Telegram user (not limited to list)
  • send_telegram_bulk: sends ONLY to users in this list

Best practice: add team members who need to receive regular alerts/notifications.
5

Instruct the assistant for Telegram workflows

Configure the assistant prompt to correctly use send_telegram and send_telegram_bulk.

๐Ÿ“ Recommended workflows to insert in prompt
1. Urgency alerts to team (broadcast):
"If customer reports CRITICAL or URGENT problem (keywords: 'emergency', 'not working', 'blocked'), send IMMEDIATELY Telegram alert to entire technical team using send_telegram_bulk. Message format: '๐Ÿšจ URGENCY: [brief problem description], Customer: [name], Tel: [number]'."

2. Supervisor summary (single user):
"At end of each call >3 minutes, send concise summary to supervisor Mario (Telegram ID: 123456789) using send_telegram. Format: 'Call completed - Customer: [name], Duration: [X] min, Outcome: [brief action/decision summary]'. Use parse_mode='Markdown' for formatting."

3. Critical action confirmations:
"When customer confirms important order/booking (>โ‚ฌ500 or special request), notify sales manager (@manager_sales) on Telegram with details: amount, customer, special notes. Use send_telegram with *bold* formatting for amount."

4. Automatic escalation:
"If unable to resolve customer request after 2 attempts, automatic escalation: send Telegram message to technical supervisor (ID: 987654321) with: reported problem, attempts made, customer data for callback. Tool: send_telegram."
๐Ÿงช Test complete workflow
Test 1 - Single message:
  1. Make sure you've done /start to the bot on Telegram
  2. Call AI4CALL assistant
  3. Ask: "Send me a test Telegram message"
  4. Assistant should invoke send_telegram with your ID
  5. Verify message reception on Telegram smartphone/desktop

Test 2 - Team broadcast:
  1. Add at least 2 users to "Authorized Users" list
  2. Both must have done /start to the bot
  3. Call assistant, simulate urgency: "There is a critical emergency"
  4. Assistant should invoke send_telegram_bulk
  5. Verify ALL authorized users receive message

Test 3 - Formatting:
  1. Ask: "Send formatted message with bold and emoji"
  2. Verify message contains correct Markdown formatting
  3. Example: *Urgent* appears bold, ๐Ÿšจ emoji visible


โ“ Frequently Asked Questions

Answers to most common questions about Telegram Bot integration

Procedure: (1) open Telegram and search for @BotFather, (2) send command /newbot, (3) choose bot name (e.g., "AI4CALL Assistant"), (4) choose bot username (must end with "bot", e.g., "ai4call_assistant_bot"), (5) BotFather generates Bot Token (string like 123456:ABC-DEF1234ghIkl...), (6) COPY token immediately and save it - it's the bot API credential, (7) configure bot: /setdescription, /setabouttext, /setuserpic optional.

send_telegram: sends to SINGLE specific user using user_id (numeric ID or @username). Use for personal notifications, individual summaries, private messages. send_telegram_bulk: sends SAME message to ALL users in "Authorized Users" list (broadcast). Use for team alerts, emergency alerts, general announcements. send_telegram_bulk does NOT require user_id - automatically sends to configured list.

Method 1: use bot @userinfobot - send /start and it responds with ID. Method 2: use bot @getidsbot - send any message. Method 3: open Telegram Web (web.telegram.org), click profile, URL contains ID after #id. Numeric ID is string like 123456789 (9 digits typically). Username (@mario) can change, ID is permanent - better to use ID for reliability.

Yes, use parse_mode parameter. Options: (1) parse_mode="Markdown": *bold*, _italic_, [link](url), `code`, ```code block```. (2) parse_mode="HTML": bold, italic, link, code. Example: send_telegram with text="*Urgent*: customer requires support" and parse_mode="Markdown" makes "Urgent" bold. Default without parse_mode: plain text.

Yes, send_telegram tool supports photo_url parameter. Provide public HTTPS URL of image (e.g., https://example.com/photo.jpg). Telegram downloads and sends image. Supported formats: JPG, PNG, GIF, WebP. Max size: 10MB for photos, 50MB for files. If photo_url provided, text becomes image caption. To send only photo without text: use text="" or omit. Example: photo_url="https://cdn.com/alert.png".

Bot CAN receive messages (if user writes to bot), but AI4CALL currently uses Telegram in SEND-ONLY mode (sending only). Bot does NOT read user replies in real-time during call. To handle replies: configure separate Telegram webhook with n8n/Zapier that processes incoming messages, saves to database/CRM, notifies team. AI4CALL use case: outbound notifications, not bidirectional conversations.

Bot Token grants full control of bot. Protection: (1) DO NOT share token publicly, (2) DO NOT commit to public Git repositories, (3) keep in secure password manager, (4) if compromised: revoke token via @BotFather command /revoke and generate new with /token, (5) use HTTPS for API communications, (6) limit authorized users to receive messages. If token leaked: anyone can send messages on behalf of your bot.

Yes, but requires additional setup. Procedure: (1) create Telegram group, (2) add bot to group as member, (3) get group_id (negative, e.g., -123456789) using @getidsbot in group, (4) use send_telegram with user_id=group_id (negative number). All group members see message. Alternative: use Telegram channel (one-way broadcast), add bot as admin, send to channel_id.

Troubleshooting checklist: (1) verify correct Bot Token (format 123456:ABC-DEF...), (2) test token with @BotFather command /mybots, (3) verify correct user_id (numeric ID or existing @username), (4) check user has started bot (sent /start) - Telegram blocks bots that haven't been started by user, (5) verify bot not blocked by user, (6) check AI4CALL logs for API errors, (7) test manually with curl/Postman Telegram API.

Currently send_telegram supports text and photo_url. For documents: workaround (1) upload file to cloud storage (Google Drive, Dropbox), (2) generate public/temporary link, (3) send link via Telegram text with message "Document available: [link]". Alternative: extend send_telegram tool with document_url parameter (requires backend modification) that uses Telegram sendDocument API. Max document size: 50MB.

Configuration via @BotFather: (1) Bot name: set during creation with /newbot, modifiable with /setname, (2) Bot username: set with /newbot (fixed, not modifiable after), (3) Profile photo: /setuserpic upload square image min 512x512px, (4) Description: /setdescription text shown when user searches for bot, (5) About: /setabouttext info shown in bot profile. Display name appears above messages sent by bot.

Telegram Bot API has no native scheduling - sends immediately. For scheduling: (1) integrate with n8n/Zapier which supports delay/cron, (2) assistant saves data + timestamp, (3) n8n waits or executes daily cron, (4) n8n invokes send_telegram at desired time. Example: daily reminder at 9:00 AM to team via send_telegram_bulk - n8n cron job at 9:00 calls tool automatically. AI4CALL workflow: immediate sending during/after call.

Technology and people:
together, zero waiting and a thousand solutions.

Ready to transform
your calls?

Request a free demo and discover how AI4CALL can revolutionize your business


Some of the ai4call users