Actions72
- Messages Actions
- Bots Actions
- Updates Actions
- Chats Actions
- Get Chat
- Get Chat Administrators
- Get Chat Member
- Get Chat Member Count
- Leave Chat
- Set Chat Title
- Set Chat Description
- Set Chat Photo
- Delete Chat Photo
- Set Chat Permissions
- Export Chat Invite Link
- Create Chat Invite Link
- Edit Chat Invite Link
- Revoke Chat Invite Link
- Approve Chat Join Request
- Decline Chat Join Request
- Set Chat Administrator Custom Title
- Ban Chat Member
- Unban Chat Member
- Restrict Chat Member
- Promote Chat Member
- Set Chat Sticker Set
- Delete Chat Sticker Set
- Pin Chat Message
- Unpin Chat Message
- Unpin All Chat Messages
- Files Actions
- Inline Queries Actions
- Callback Queries Actions
Overview
The node "N8N Tools Telegram" integrates with the Telegram Bot API, enabling automation workflows to interact with Telegram bots and their features. Specifically, for the Callback Queries resource with the Answer Callback Query operation, this node allows you to respond to callback queries sent from inline keyboards in Telegram messages.
This is useful when building interactive Telegram bots that require user input via buttons. For example, after a user presses an inline button, your workflow can process the callback query and send an appropriate response or notification back to the user.
Practical examples:
- Confirming a user's choice in a quiz bot.
- Acknowledging receipt of a command triggered by an inline button.
- Providing feedback or updating UI elements dynamically based on user interaction.
Properties
| Name | Meaning |
|---|---|
| Callback Query ID | The unique identifier for the Telegram callback query to answer. |
| Options | Additional optional parameters as a JSON object to customize the answer behavior. |
The Options property can include any valid fields supported by the Telegram Bot API's answerCallbackQuery method, such as text, show_alert, url, or cache_time.
Output
The node outputs a JSON object representing the response from the Telegram Bot API after answering the callback query. This typically includes a boolean ok field indicating success and may contain additional metadata depending on the API response.
No binary data output is involved in this operation.
Example output JSON structure:
{
"ok": true,
"result": true
}
Dependencies
- Requires a valid Telegram Bot API token configured as credentials in n8n.
- Uses an external validation service ("N8N Tools API") to verify subscription and API key before making Telegram API calls.
- The node depends on the bundled
telegram-apimodule for interacting with Telegram endpoints.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that your API key credential is correct and active.
- Unknown operation error: Ensure the selected operation matches the resource; for example, "Answer Callback Query" must be used with the "Callback Queries" resource.
- Malformed JSON in Options: The
Optionsfield expects valid JSON. Invalid JSON syntax will cause errors. Use proper JSON formatting. - Missing Callback Query ID: The
Callback Query IDis required. Omitting it or providing an incorrect ID will result in failure to answer the callback query.