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 perform various chat-related operations, including managing chat photos. Specifically, the "Delete Chat Photo" operation removes the current photo of a specified Telegram chat. This is useful for bot administrators who want to programmatically update or clear chat photos without manual intervention.
Common scenarios include:
- Automatically clearing group or channel photos based on certain triggers.
- Managing chat appearance dynamically in response to events.
- Cleaning up chat visuals as part of moderation workflows.
Example: A bot that deletes the chat photo when a specific command is received or after a scheduled time.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier for the Telegram chat where the photo will be deleted. |
| Options | Additional JSON options for the operation (not specifically used in Delete Chat Photo). |
Output
The node outputs a JSON object representing the result returned by the Telegram Bot API for the delete chat photo request. Typically, this is a boolean indicating success (true) or failure (false).
No binary data output is involved in 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 validation service ("N8N Tools API") which validates usage before making Telegram API calls.
- The node uses HTTP requests to communicate with both the validation API and Telegram Bot API endpoints.
Troubleshooting
- Invalid subscription or API key error: If you see "N8N Tools API: Invalid subscription or API key," verify your API key and subscription status for the external validation service.
- Unknown operation error: Ensure the operation name is correctly set to "Delete Chat Photo" under the Chats resource.
- Chat ID errors: Make sure the Chat ID is correct and the bot has appropriate permissions in the chat.
- API rate limits or permission errors: Telegram may reject requests if the bot lacks admin rights or exceeds rate limits; check bot permissions and retry policies.