Telegram MTPROTO API Trigger icon

Telegram MTPROTO API Trigger

Listens for new messages from Telegram using MTPROTO API

Telegram MTPROTO API Trigger

AI-generated

Overview

This node listens for new messages from Telegram using the MTPROTO API. It establishes a connection to Telegram with provided credentials and emits data whenever a new message is received. It supports both automatic event-driven triggering and manual triggering with a timeout. This node is useful for workflows that need to react to incoming Telegram messages in real-time, such as chatbots, notification systems, or message logging.

Use Case Examples

  1. Automatically trigger a workflow when a new Telegram message arrives in a specific chat or channel.
  2. Manually trigger a workflow to wait for a new Telegram message within a 30-second window, useful for testing or controlled message processing.

Output

JSON

  • peer - The Telegram entity (user, chat, or channel) from which the message originated.
  • message - The full message object received from Telegram.
  • isGroup - Boolean indicating if the message is from a group chat.
  • isChannel - Boolean indicating if the message is from a channel.
  • isPrivate - Boolean indicating if the message is from a private chat.
  • chat - The chat object associated with the message.

Dependencies

  • Telegram MTPROTO API credentials required for authentication.

Troubleshooting

  • Connection errors may occur if credentials are incorrect or the Telegram authorization is not completed. Ensure credentials are valid and the app is authorized.
  • Timeout errors can happen during manual triggering if no message is received within 30 seconds. Increase timeout or ensure messages are sent during manual trigger.
  • Errors adding or removing event handlers may occur; check logs for details and ensure the Telegram client is properly connected.

Discussion