BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Send Chat Action" operation in the Message resource allows a bot to broadcast a chat action status to a target chat in Bale Messenger. This status indicates to the chat participants that the bot is performing an action such as typing, uploading a photo, recording voice, etc. The action status typically lasts for up to 5 seconds or until the bot sends a message.

This node is useful in scenarios where you want to provide real-time feedback to users that the bot is actively processing or preparing content. For example:

  • Showing "typing" status while generating a response.
  • Indicating "upload_photo" when sending images.
  • Signaling "record_voice" before sending a voice message.

Such feedback improves user experience by making interactions feel more natural and responsive.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the chat action will be broadcasted.
Action Type of chat action to broadcast. Options include:
- Record Video
- Record Voice
- Typing
- Upload Photo
- Upload Video
- Upload Voice
Choose depending on what the user is about to receive.

Output

The output JSON contains a single field:

  • successful (boolean): Indicates whether the chat action was successfully sent to the target chat.

No binary data is produced by this operation.

Example output:

{
  "successful": true
}

Dependencies

  • Requires an API authentication token credential configured in n8n to access the Bale Messenger API.
  • Uses the Bale Messenger Bot API endpoint at https://tapi.bale.ai/bot.
  • Relies on the official Bale Messenger Node.js SDK or compatible HTTP requests to send chat actions.

Troubleshooting

  • Common issues:

    • Invalid or missing chat ID: Ensure the chat ID corresponds to an existing chat accessible by the bot.
    • Invalid or expired API token: Verify the API key credential is valid and has necessary permissions.
    • Network connectivity problems: Confirm that the n8n instance can reach the Bale Messenger API endpoint.
  • Error messages:

    • Errors from the Bale API are logged internally but not explicitly shown in output. If the successful field is false or missing, check the node execution logs for detailed error information.
    • If the node fails silently, verify that all required parameters (chatId, action) are provided and correctly formatted.

Links and References

Discussion