Get Bot Info
Retrieves information about the connected Telegram bot, including its username, ID, name, and other details.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Input
- Client Id - (Optional) The unique identifier for the bot client connection obtained from the Connect node. If not provided, you can use Bot Token instead.
Options
- Bot Token - (Optional) The Telegram bot token credential. This is an alternative to using Client Id - provide either Client Id OR Bot Token, not both.
Output
- Bot Info - An object containing information about the bot, including:
id- The bot's unique identifierusername- The bot's username (without @)first_name- The bot's first namelast_name- The bot's last name (if set)is_bot- Always true for botscan_join_groups- Whether the bot can be added to groupscan_read_all_group_messages- Whether the bot can read all group messagessupports_inline_queries- Whether the bot supports inline queries
How It Works
The Get Bot Info node queries the Telegram Bot API to retrieve information about the bot. When executed, the node:
- Either uses the provided Client Id or creates a temporary connection using Bot Token
- Calls the Telegram API
getMemethod - Retrieves the bot's profile information
- Returns the information as an object in the Bot Info output
- If using Bot Token (without Client Id), the temporary connection is closed after retrieval
Requirements
- Either a valid Client Id from a Connect node OR a valid Bot Token credential
- Network connectivity to Telegram's API
Error Handling
The node will return errors in the following cases:
- Neither Client Id nor Bot Token provided
- Invalid Client Id that doesn't correspond to an existing connection
- Invalid or expired Bot Token
- Network connectivity issues
- Telegram API errors
Usage Examples
Using with Connect Node:
Connect → Get Bot Info → Log (Bot Info)
Standalone Usage (without Connect):
Get Bot Info (with Bot Token) → Log (Bot Info)
Verify Bot Before Sending Messages:
Connect → Get Bot Info → Check Bot Username → Send Message → Disconnect
Output Example
{
"id": 123456789,
"is_bot": true,
"first_name": "My Automation Bot",
"username": "my_automation_bot",
"can_join_groups": true,
"can_read_all_group_messages": false,
"supports_inline_queries": false
}
Use Cases
Bot Verification:
- Verify the bot is properly configured before starting a flow
- Check that the bot has the correct username
- Confirm the bot's capabilities
Dynamic Bot Selection:
- Retrieve bot information to decide which actions to take
- Display bot details in logs or notifications
- Build multi-bot systems that select bots based on capabilities
Debugging:
- Verify that your bot token is valid
- Check bot permissions and settings
- Troubleshoot connection issues
Best Practices
- Verify before operations - Use Get Bot Info at the start of flows to ensure the bot is accessible
- Cache bot info - Store the bot info in a variable if you need to reference it multiple times
- Error handling - Check for errors to catch invalid tokens or connectivity issues early
- Log bot details - Include bot username in logs for easier troubleshooting
- Permission checks - Use the output to verify the bot has required capabilities
Common Patterns
Bot Health Check:
Connect → Get Bot Info → If (is_bot == true) → Continue Flow
Multi-Bot Routing:
Get Bot Info → Switch (username)
Case "support_bot" → Handle Support
Case "notification_bot" → Send Notifications
Default → Error
Startup Validation:
Connect
→ Get Bot Info
→ If (can_join_groups == true)
→ Create Invite Link
→ Send to Admin
→ Disconnect
Tips
- You can use this node without a Connect node by providing a Bot Token directly - useful for quick checks
- The bot username is useful for creating @mentions in messages
- Store the bot ID to identify messages sent by your bot vs. received messages
- Check
can_read_all_group_messagesto understand if your bot has privacy mode enabled - Use this node to verify token validity before performing expensive operations