Telegram Integration Guide

Sophia Martinez
Mobile Integrations Lead
Sophia specializes in mobile notification systems and instant messaging platform integrations.
In this article
Introduction
Integrate PhoneShield with Telegram to receive instant notifications about your calls, including call summaries, caller information, and more. This guide will walk you through setting up a Telegram bot and configuring it with PhoneShield.
Benefits of Telegram Integration
Instant notifications directly to your mobile device
Receive concise call summaries without checking email
Option to send notifications to groups for team awareness
Secure, end-to-end encrypted messaging
Before You Begin
You'll need a Telegram account and access to your PhoneShield dashboard. The setup process takes approximately 5-10 minutes to complete.
Step 1: Create a Telegram Bot
To receive notifications in Telegram, you need to create a bot first:
Start BotFather Chat
Open Telegram and search for @BotFather:
- Start a chat with BotFather
- Send the command:
/newbot
- Follow the instructions to choose a name and username
- The username must end with "bot" (e.g., "PhoneShieldNotifierBot")
Save Bot Token
After creating your bot, BotFather will give you a token:
- The token looks like:
123456789:ABCDefGhIJKlmNoPQRsTUVwxyZ
- This is your authentication key for the Telegram API
- Keep this token secure - don't share it publicly
- You'll need this for the PhoneShield integration
What is a Telegram Bot?
A Telegram bot is a special account that doesn't require a phone number to set up and is operated by software. Your PhoneShield integration will use this bot to send you notifications about calls.
Bot Characteristics
- No phone number required
- Username must end with "bot"
- Can be private or added to groups
- Controlled via HTTP API
Bot Privacy
- Only you will receive notifications
- Bot tokens should be kept private
- Bots can be deleted via BotFather
- Can be customized with a profile picture
Security Notice
Your bot token is like a password. Never share it publicly or include it in screenshots. Anyone with your bot token could send messages as your bot.
Step 2: Get Your Chat ID
For the bot to send you messages, you need to find your Chat ID:
Find Your Chat ID
To receive messages from your bot, you need your Chat ID:
- Start a chat with your new bot and send any message
- Visit:
https://api.telegram.org/bot[YOUR-BOT-TOKEN]/getUpdates
- Look for
"chat":{"id":123456789}...
- The number (e.g., 123456789) is your Chat ID
Group Chat Setup
If you want to receive notifications in a group chat (such as a team channel):
- Create a group in Telegram
Create a new group or use an existing one.
- Add your bot to the group
Search for your bot by username and add it to the group.
- Send a message mentioning the bot
Use the @ symbol to mention your bot in a message.
- Get the group Chat ID
Use the getUpdates method as described above. For groups, the Chat ID is a negative number.
Step 3: Configure PhoneShield Integration
Now that you have your Bot Token and Chat ID, you can configure PhoneShield:
- Navigate to Integrations in your dashboard
Access your PhoneShield dashboard and find the Integrations section.
- Find the "Telegram" integration card
Look for the Telegram card among the available integration options and click "Connect".
- Enter your Bot Token
Paste the token you received from BotFather.
- Enter your Chat ID
Paste the Chat ID you obtained in the previous step.
- Customize the Message Template (optional)
Create a custom format for your notifications using template variables.
- Save the configuration
Click "Save Configuration" to complete the setup.
- Test the integration
Make a test call to your PhoneShield number to verify the integration works.
Success Indicator
When correctly configured, you should receive a Telegram message for each call that comes to your PhoneShield number. The notification will be sent once the call ends and a summary is generated.
Customizing Message Templates
You can personalize your Telegram notifications using template variables:
Available Variables
{{callerName}}
Name of the caller{{callerNumber}}
Phone number of caller{{callTime}}
When the call was received{{callDuration}}
Length of the call{{callPurpose}}
Purpose identified by AI{{summary}}
AI-generated call summaryBasic Notification
📞 Call from: {{callerName}} ({{callerNumber}}) ⏱️ Duration: {{callDuration}}🗒️ Summary: {{summary}}
Detailed Notification
*PHONESHIELD NOTIFICATION* 📞 Call from: {{callerName}} ({{callerNumber}}) ⏱️ Time: {{callTime}}⌛ Duration: {{callDuration}}🔍 Purpose: {{callPurpose}}📝 Summary:{{summary}}View details in dashboard: https://phoneshield.ai/dashboard/calls
Minimal Notification
Call: {{callerName}} - {{callPurpose}}{{summary}}
Formatting Tip
Telegram supports limited markdown formatting in bot messages. You can use *bold*, _italic_, and `code` formatting in your templates.
Troubleshooting
If you encounter issues with your Telegram integration, here are some common solutions:
Bot Not Sending Messages
- Make sure you've started a conversation with your bot first
- Verify that the Bot Token and Chat ID are entered correctly
- Check that your bot has permission to send messages (it should be an admin in groups)
- Ensure your internet connection is working
- Try creating a new bot if all else fails
Wrong Chat ID
- Ensure you've sent a message to the bot first
- Try the getUpdates method again after sending a new message
- For group chats, remember the Chat ID is a negative number
- Make sure you're looking at the most recent entry in the getUpdates response
Message Template Issues
- Ensure variables are formatted correctly with double curly braces:
{{variable}}
- Check that you're using supported variable names
- Test with a simple template first, then add more complexity
- Remember that Telegram supports limited markdown formatting
Still Having Issues?
If you continue to experience problems with your Telegram integration after trying these solutions, contact PhoneShield support at support@phoneshield.ai for assistance.
Related Articles
Ready to try PhoneShield?
Start screening your calls today and take back control of your phone.