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
This node integrates with the Telegram Bot API to manage updates and webhooks for a Telegram bot. Specifically, the Set Webhook operation under the Updates resource allows you to configure a webhook URL where Telegram will send incoming update notifications (such as messages, edited messages, channel posts, etc.) in real-time.
Use cases include:
- Setting up a webhook URL to receive Telegram updates instantly instead of polling.
- Automating workflows triggered by Telegram events via n8n.
- Managing Telegram bot updates efficiently in event-driven automation scenarios.
For example, you can use this node to set your server's HTTPS endpoint as the webhook URL so that your bot receives updates immediately when users interact with it.
Properties
| Name | Meaning |
|---|---|
| Webhook Data | JSON object containing the webhook configuration data to be sent to Telegram's setWebhook API method. This typically includes the webhook URL and optional parameters like allowed updates, max connections, etc. Example: { "url": "https://yourdomain.com/telegram-webhook" } |
| Options | Additional JSON options for the operation. For the Updates resource, this can include extra parameters supported by the Telegram API for webhook setup or other update-related operations. |
Output
The node outputs a JSON object representing the response from the Telegram Bot API after setting the webhook. This usually contains a boolean ok field indicating success and possibly additional information about the webhook status.
Example output structure:
{
"ok": true,
"result": true
}
No binary data is produced by this operation.
Dependencies
- Requires an active Telegram Bot API token credential configured in n8n.
- Requires a valid subscription and API key for the external validation service ("N8N Tools API") used internally to validate credentials before making Telegram API calls.
- The node makes HTTP requests to the Telegram Bot API endpoints.
- The webhook URL must be HTTPS and publicly accessible for Telegram to deliver updates.
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 for the external validation service is correct and active.
- Webhook URL issues: Ensure the webhook URL provided in the Webhook Data is HTTPS and reachable from the internet. Telegram requires a valid SSL certificate.
- Permission errors: Make sure the Telegram bot token has the necessary permissions to set webhooks.
- Malformed JSON input: The Webhook Data property expects valid JSON. Invalid JSON will cause parsing errors.
- Unknown operation error: Using an unsupported operation value will throw an error; ensure the operation is exactly "setWebhook" for this resource.