BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The node interacts with the Bale Messenger API to perform various chat-related operations. Specifically, for the Chat - Set Chat Photo operation, it allows setting a new profile photo for a group, supergroup, or channel by uploading an image from binary data.

This operation is useful when you want to programmatically update the chat's profile picture, for example:

  • Automatically updating a group photo based on events or campaigns.
  • Setting a custom photo for a newly created chat.
  • Changing the chat photo as part of a workflow triggered by external triggers.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the photo will be set.
Binary Property The name of the binary property in the input data that contains the photo file to upload.

Output

The output JSON contains a single field:

  • set: The response from the Bale Messenger API indicating the result of the set chat photo request. This typically confirms whether the photo was successfully updated.

No binary data is output by this operation.

Example output JSON structure:

{
  "set": {
    // API response details confirming the photo update
  }
}

Dependencies

  • Requires an active Bale Messenger API credential with a valid token.
  • The node uses the Bale Messenger API endpoint at https://tapi.bale.ai/bot.
  • Input binary data must be provided containing the photo to set as the chat photo.

Troubleshooting

  • Missing or invalid Chat ID: Ensure the Chat ID is correctly specified and corresponds to a valid chat where the bot has permission to change the photo.
  • Binary data issues: The binary property name must match the actual binary data key in the input. The binary data must contain valid image data.
  • API errors: If the Bale Messenger API returns an error (e.g., insufficient permissions, invalid photo format), the node will throw an error. Check the API response message for details.
  • Credential problems: Verify that the API token credential is correctly configured and has necessary permissions.

Links and References

Discussion