Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node enables Telegram login using a phone number through a ChatTrigger interface, supporting multi-factor authentication (MFA) and session management commands. It facilitates Telegram account login, session control, and interaction with Telegram API for various operations such as sending messages, managing chats, and retrieving user or chat information. It is useful for automating Telegram interactions in workflows, especially where phone number login and session handling are required.

Use Case Examples

  1. Automate Telegram login via phone number and MFA using chat commands.
  2. Manage Telegram sessions by starting, stopping, or clearing local session data.
  3. Send messages, photos, audio, and files to Telegram chats programmatically after login.
  4. Retrieve user, chat, and message information from Telegram for processing.

Output

JSON

  • text - Textual response or status messages from login commands or operations
  • apiHash - Masked API hash credential information when requested
  • message - Message details or error information in JSON output
  • error - Error details if an operation fails
  • success - Boolean indicating success of an operation
  • result - Result data from Telegram API calls
  • chat_id - Telegram chat identifier related to the operation
  • audioSource - Source type of audio data sent
  • sendAsVoice - Indicates if audio is sent as a voice message
  • fileExtension - File extension of audio files sent as voice messages
  • warning - Warnings related to file format or usage
  • errorType - Categorized error type for specific Telegram API errors

Dependencies

  • Requires a Telegram API key credential with apiId, apiHash, and phoneNumber for authentication.
  • Uses TelePilotNodeConnectionManager for managing Telegram client sessions and authentication states.

Troubleshooting

  • Common issues include session closure or termination requiring re-login.
  • Errors like 'Unauthorized' or 'A closed client cannot be reused' indicate session problems and need re-authentication.
  • File-related errors when sending audio or files, such as missing file paths or unsupported formats.
  • Telegram API restrictions like user restrictions on receiving messages or expired file references.
  • Use the /help command in ChatTrigger for guidance on supported commands and login process.

Links

Discussion