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 interacts with the Telegram Bot API to perform various operations related to Telegram inline queries. Specifically, for the "Answer Inline Query" operation under the "Inline Queries" resource, it allows you to respond to an inline query sent by a user in Telegram. This is useful when building Telegram bots that provide dynamic content or search results directly within the chat interface.
Typical use cases include:
- Providing custom search results or content previews when users type inline queries.
- Responding with rich media, articles, or interactive elements as inline query results.
- Enhancing user experience by delivering instant answers without requiring users to send explicit commands.
For example, a bot could answer an inline query with a list of product cards, news articles, or images relevant to the user's input.
Properties
| Name | Meaning |
|---|---|
| Inline Query ID | The unique identifier of the Telegram inline query to which the bot should respond. |
| Results | A JSON array representing the results to be returned for the inline query. These results follow Telegram's inline query result format. |
| Options | Additional optional parameters as a JSON object to customize the response behavior (e.g., cache time, personalization). |
Output
The node outputs a JSON object representing the response from the Telegram Bot API after answering the inline query. This typically includes confirmation of the request success and any metadata returned by Telegram.
The output does not include binary data for this operation.
Dependencies
- Requires an active Telegram Bot API token configured as credentials in n8n.
- Requires a valid subscription and API key for the external "N8N Tools API" service used for validation before making Telegram API calls.
- The node uses the Telegram Bot API endpoint
https://api.telegram.orgvia the bundled Telegram API helper class.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that your N8N Tools API credentials are correct and active.
- Malformed JSON in Results or Options: Ensure that the JSON provided in the "Results" and "Options" fields is correctly formatted according to Telegram's API specifications.
- Missing Inline Query ID: The "Inline Query ID" must be provided; otherwise, the Telegram API will reject the request.
- Unknown operation error: This node only supports specific operations per resource. Using unsupported operations will cause errors.
- HTTP request failures: Network issues or incorrect Telegram Bot API tokens can cause request failures. Check connectivity and credentials.