BaleMessenger icon

BaleMessenger

Interact with Bale Messenger API

Overview

The "Send Contact" operation of the BaleMessenger node allows users to send a contact card to a specified chat in Bale Messenger. This is useful for sharing phone numbers and contact details directly within a chat conversation, enabling easy communication and information exchange.

Common scenarios include:

  • Automatically sending customer support contacts to users.
  • Sharing team member contact info in group chats.
  • Distributing event or business contacts during automated workflows.

For example, you can configure this node to send a contact with a phone number and name to a user or group chat when triggered by an event, such as a form submission or a command.

Properties

Name Meaning
Chat ID Unique identifier for the target chat where the contact will be sent.
Phone Number The phone number of the contact to be sent (e.g., "+989123456789").
First Name The first name of the contact to be sent.
Last Name The last name of the contact to be sent (optional).
Reply To Message ID If replying to a specific message, the ID of that original message (optional).
Reply Markup Additional interface options for the message. Options: Inline Keyboard, None, Reply Keyboard, Reply Keyboard Remove.

Reply Markup Details

  • Inline Keyboard: Adds buttons next to the message; each button can have text, callback data, or URL.
  • Reply Keyboard: Adds a custom keyboard with reply options.
  • Reply Keyboard Remove: Requests clients to remove the custom keyboard.
  • None: No additional interface options.

Output

The output JSON contains the response from the Bale Messenger API after sending the contact. It typically includes details about the sent message or confirmation of success.

Example structure:

{
  "message_id": 123,
  "chat": {
    "id": "chatId",
    "type": "private"
  },
  "contact": {
    "phone_number": "+989123456789",
    "first_name": "John",
    "last_name": "Doe"
  }
}

No binary data is output by this operation.

Dependencies

  • Requires an active Bale Messenger API authentication token configured in n8n credentials.
  • Uses the Bale Messenger Bot API endpoint at https://tapi.bale.ai/bot.
  • The node depends on the official Telegram Bot API client library adapted for Bale Messenger.

Troubleshooting

  • Invalid Chat ID: Ensure the chat ID is correct and the bot has permission to send messages to that chat.
  • Missing Required Fields: Phone number and first name are mandatory; missing these will cause errors.
  • API Authentication Errors: Verify that the API token credential is valid and has not expired.
  • Reply Markup Misconfiguration: Incorrectly structured inline or reply keyboards may cause the API to reject the request.
  • Network Issues: Connectivity problems to the Bale Messenger API endpoint can cause timeouts or failures.

If an error occurs, the node outputs an error message with details from the API response to help diagnose the issue.

Links and References

Discussion