Telegram CoPilot Trigger icon

Telegram CoPilot Trigger

Your Personal Telegram CoPilot Listener

Overview

This node acts as a trigger for Telegram updates using the TelePilot API, allowing workflows to listen for various Telegram events in real time. It is designed to connect to a Telegram account and emit data whenever specified update events occur, such as new messages, message edits, chat changes, user status updates, and many more.

Common scenarios where this node is beneficial include:

  • Automating responses or actions based on incoming Telegram messages.
  • Monitoring chat activity or user interactions within Telegram groups or channels.
  • Integrating Telegram event data into other systems or workflows for notifications, logging, or analytics.
  • Building custom Telegram bots or assistants that react to specific Telegram updates.

For example, you could configure the node to listen for new messages and automatically forward them to another service, or track when a chat title is updated and log the change.

Properties

Name Meaning
Events Select one or multiple Telegram update event types to listen for. Options include all Telegram update events such as: updateNewMessage, updateMessageContent, updateChatTitle, updateUserStatus, updateCall, and many others. Selecting * listens to all events.

The "Events" property allows multi-selection of any combination of supported Telegram update events. By default, it listens to "updateNewMessage" and "updateMessageContent" events.

Output

The node outputs JSON data representing the Telegram update event object received from the TelePilot client. Each emitted item contains the full update payload under the json field, which includes an _ property indicating the update type (e.g., "updateNewMessage") and other relevant fields depending on the event.

No binary data output is produced by this node.

Example output JSON structure (simplified):

{
  "json": {
    "_": "updateNewMessage",
    "message": {
      "id": 123,
      "chat_id": 456,
      "sender_user_id": 789,
      "content": { /* message content details */ }
    },
    "date": 1680000000
  }
}

Dependencies

  • Requires an API key credential with Telegram API credentials (apiId, apiHash, and phone number) to authenticate with the TelePilot service.
  • Uses the TelePilot Node Connection Manager internally to manage client sessions and authentication.
  • The node depends on the TelePilot API and its underlying TDLib-based update event system.
  • Requires proper configuration of the Telegram API credentials in n8n credentials settings.

Troubleshooting

  • Not logged in error: If the Telegram account is not logged in, the node emits a message instructing to use a separate login node with phone number authentication. Ensure the Telegram API credentials are valid and the account is authenticated before running this trigger.
  • Timeout on manual trigger: When running the node manually, if no matching update event is received within 30 seconds, the execution aborts with a timeout error. This is expected behavior; in active workflows, the node listens indefinitely.
  • No events received: Verify that the selected events in the "Events" property match the actual updates expected from the Telegram account. Using "*" can help debug by listening to all events.
  • Connection errors: Network issues or invalid credentials may cause connection failures. Check logs for error messages and verify API keys and network connectivity.

Links and References

Discussion