Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The Send Text Message operation of the Message resource in this custom n8n node allows you to send plain text messages to a specified Telegram chat using the TelePilot integration. This is useful for automating notifications, alerts, or any form of communication directly into Telegram chats from your workflows.

Common scenarios:

  • Sending automated status updates to a team group.
  • Notifying users about workflow events (e.g., order received, error occurred).
  • Integrating with other systems to relay information to Telegram.

Example:
Automatically send "Build completed successfully" to a developer chat when a CI/CD pipeline finishes.


Properties

Display Name Type Required Description
Chat ID String Yes ID of the target Telegram chat.
Message Text String Yes The text content of the message to send.
Reply to messageId String No (Optional) ID of the message to reply to.

Output

The output will be a JSON object representing the result of the sent message as returned by the Telegram API. The structure typically includes:

{
  "@type": "message",
  "id": <number>,
  "chat_id": <number>,
  "date": <timestamp>,
  "content": {
    "@type": "messageText",
    "text": {
      "@type": "formattedText",
      "text": "<your message text>"
    }
  },
  ...
}
  • id: Unique identifier of the sent message.
  • chat_id: Identifier of the chat where the message was sent.
  • date: Timestamp of when the message was sent.
  • content.text.text: The actual text of your message.

Additional fields may be present depending on Telegram's response.


Dependencies

  • External Service: Requires access to the Telegram API via the TelePilot backend.
  • Credentials: You must configure and provide valid TelePilot API credentials (telePilotApi) in n8n.
  • Environment: No special environment variables are required beyond standard n8n credential setup.

Troubleshooting

Common Issues:

  • Invalid Chat ID: If the Chat ID is incorrect or the bot/user does not have permission to write to the chat, the message will not be delivered.
  • Authentication Errors: If your TelePilot session is expired or not logged in, you'll receive an error prompting you to log in again.
  • Session Closed: If the session is closed, you may see an error like "Session was closed or terminated. Please login again."

Error Messages & Resolutions:

  • "Please login: https://telepilot.co/login-howto"
    Resolution: Re-authenticate your TelePilot credentials as described in the linked guide.
  • "Cannot send messages to this chat. You may not have permission."
    Resolution: Ensure the bot/user has access to the target chat.
  • "Invalid file ID" or similar errors (if sending files):
    Resolution: Check that all referenced files exist and are accessible.

Links and References


Discussion