Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The node implements a Telegram client interface called "Telegram CoPilot" that allows users to interact with Telegram chats programmatically. Specifically, the Send Chat Action operation under the Chat resource enables sending various chat status actions (like typing, recording voice note, uploading media) to a specified chat. This is useful for simulating user activity indicators in chats, enhancing bot interactivity and user experience.

Common scenarios include:

  • Indicating to chat participants that a message is being typed.
  • Showing that a voice note or photo is being uploaded.
  • Canceling any ongoing chat action indicator.

Practical example: A chatbot can send a "typing" action before sending a reply message to make the interaction feel more natural.

Properties

Name Meaning
Chat ID The unique identifier of the chat where the action will be sent. Example: 122323
Action The type of chat action to send. Options include:
- Cancel
- Recording voice note
- Typing
- Uploading document
- Uploading photo
- Uploading video
- Uploading voice note

Output

The output is a JSON object representing the result of the sendChatAction API call to Telegram. It typically contains confirmation details about the action sent to the chat. The exact structure depends on Telegram's response but generally includes success status and metadata related to the chat action.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram API authentication credential (an API key/token).
  • Depends on the TelePilotNodeConnectionManager service to manage Telegram client sessions.
  • The node expects the Telegram account to be logged in and connected; otherwise, it prompts for login via phone number and code.
  • No additional environment variables are explicitly required beyond the Telegram API credentials.

Troubleshooting

  • Error: "Please login"
    Occurs if the Telegram session is not authenticated. Resolve by using the login flow with phone number and authentication code, possibly via the ChatTrigger node as described in the guide at https://telepilot.co/login-howto.

  • Error: "Session was closed or terminated"
    Indicates the Telegram client session was closed unexpectedly. Re-login is required.

  • API errors related to permissions
    For example, "CHAT_WRITE_FORBIDDEN" means the bot/user does not have permission to send actions/messages to the chat.

  • Invalid Chat ID
    Ensure the Chat ID provided is correct and accessible by the authenticated Telegram account.

  • Network or connectivity issues
    May cause failures in invoking Telegram API methods. Check network connection and Telegram service status.

Links and References

Discussion