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 provides integration with the Telegram Bot API, enabling automation of various Telegram chat-related actions. Specifically for the Chats resource and the Pin Chat Message operation, it allows users to pin a specific message in a Telegram chat. Pinning a message highlights it at the top of the chat, making it easily visible to all chat members.
This functionality is useful in scenarios such as:
- Highlighting important announcements or rules in group chats.
- Keeping track of key messages in community or team chats.
- Automating chat management tasks within workflows.
For example, a workflow could automatically pin a welcome message when a new user joins a group, or pin a daily update message sent by a bot.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier for the target Telegram chat where the message will be pinned. |
| Message ID | The identifier of the Telegram message to pin within the specified chat. |
| Options | Additional optional parameters for pinning the message, provided as a JSON object. |
The Options property can include any extra settings supported by the Telegram API for pinning messages, such as whether to disable notification for the pin action.
Output
The node outputs a JSON object representing the response from the Telegram Bot API after attempting to pin the chat message. This typically includes confirmation details about the pinned message or an error description if the operation failed.
No binary data output is involved in this operation.
Dependencies
- Requires a valid Telegram Bot API token configured as credentials in n8n.
- Requires access to the "N8N Tools API" service with a valid subscription and API key for validation before executing Telegram API calls.
- The node uses HTTP requests to communicate with both the N8N Tools API and the Telegram Bot API endpoints.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential for the N8N Tools API is correctly set and active.
- Telegram API errors: Errors returned from Telegram (e.g., invalid chat ID, message ID not found, insufficient permissions) should be checked against Telegram Bot API documentation. Ensure the bot has admin rights in the chat to pin messages.
- JSON parsing errors: The
Optionsfield expects valid JSON. Malformed JSON input will cause failures. - Permission issues: The bot must have permission to pin messages in the target chat; otherwise, the operation will fail.