Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The Send Chat Action operation for the Chat resource in this custom n8n node allows you to send a "chat action" (such as "typing", "uploading photo", etc.) to a Telegram chat. This is useful for providing real-time feedback to users, indicating that the bot is performing an action (e.g., typing a message or uploading a file) before sending an actual message.

Common scenarios:

  • Indicating to a user that the bot is preparing a response ("Typing..." indicator).
  • Showing that a file or photo is being uploaded.
  • Providing a more interactive and human-like experience in Telegram bots.

Practical example:
When a user sends a command to your Telegram bot, you can use this node to show the "typing" status while your workflow processes data, making the interaction feel more responsive.


Properties

Display Name Type Description
Chat ID String The unique identifier of the target chat where the action will be sent.
Action Options The type of action to display in the chat. Possible values:
- Cancel: Cancel any ongoing chat action
- Recording Voice Note: Show "recording voice note" status
- Typing: Show "typing..." status
- Uploading Document: Show "uploading document" status
- Uploading Photo: Show "uploading photo" status
- Uploading Video: Show "uploading video" status
- Uploading Voice Note: Show "uploading voice note" status

Output

The output is a JSON object containing the result of the sendChatAction request. The structure typically includes:

{
  "_": "ok"
}
  • If successful, the response will indicate success (usually with a field like "_" : "ok").
  • If there is an error, the output may contain error details depending on the underlying Telegram API response.

Dependencies

  • External Service: Requires access to the Telegram API via the TelePilot integration.
  • Credentials: You must configure the telePilotApi credential in n8n, which includes your Telegram API ID, API Hash, and phone number.
  • n8n Configuration: No special environment variables are required beyond the credentials.

Troubleshooting

Common issues:

  • Invalid Chat ID: If the provided Chat ID is incorrect or the bot does not have access to the chat, the action will fail.
  • Not Logged In: If the Telegram session is not authenticated, you may receive errors prompting you to log in again.
  • Permission Errors: If the bot lacks permission to send actions in the specified chat, an error will occur.

Error messages and resolutions:

  • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
    Resolution: Re-authenticate your Telegram account using the provided guide.
  • "Please login: https://telepilot.co/login-howto"
    Resolution: Ensure your credentials are valid and follow the login instructions.
  • Other errors may be returned directly from the Telegram API; check the error message for details.

Links and References

Discussion