Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node, named "Telegram CoPilot," integrates with the Telegram API to perform various Telegram-related actions programmatically. Specifically, for the Chat resource and Send Chat Action operation, it allows sending chat action notifications to a specified chat. These chat actions represent user activities such as typing, recording a voice note, or uploading media, which are typically shown in Telegram clients to indicate that the other party is performing an action.

Common scenarios where this node is beneficial include:

  • Indicating to chat participants that a message or media is being composed or uploaded.
  • Automating chat interactions by signaling activity status before sending messages.
  • Enhancing chatbot or automation workflows by mimicking real user behavior in chats.

Practical example:

  • Before sending a photo message to a chat, the node can send the "Uploading Photo" chat action to inform recipients that a photo is being uploaded.

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 array containing the response from the Telegram API after invoking the sendChatAction method. This response typically confirms whether the chat action was successfully sent.

The structure of each output item corresponds to the Telegram API's response object for the chat action request, which may include status or error information.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram API authentication credential (an API key and associated login).
  • Depends on the TelePilotNodeConnectionManager to manage Telegram client sessions.
  • The node requires proper login/authentication to Telegram via phone number and code before operations can be executed.
  • Network access to Telegram servers is necessary.

Troubleshooting

  • Session Closed or Unauthorized Errors:
    If the node throws errors indicating the client session is closed or unauthorized, it means the Telegram session has expired or was terminated. The user must re-authenticate using the login flow described at https://telepilot.co/login-howto.

  • Invalid Chat ID:
    Providing an incorrect or non-existent chat ID will cause the API call to fail. Verify the chat ID is correct.

  • Incorrect Action Value:
    The action property must be one of the predefined options. Using an unsupported value will result in an error.

  • Network Issues:
    Ensure stable internet connectivity to reach Telegram servers.

  • API Rate Limits:
    Excessive requests might be throttled by Telegram. Implement delays or retries if needed.

Links and References

Discussion