NimChat icon

NimChat

call NimChat api

Overview

This node integrates with the NimChat API to send messages or files to specified users within a NimChat account inbox. It is useful for automating communication workflows, such as sending notifications, alerts, or sharing documents directly through NimChat from an n8n workflow.

Common scenarios include:

  • Sending text messages automatically based on triggers (e.g., form submissions, system events).
  • Sharing files like reports, images, or logs to team members or customers via NimChat.
  • Integrating NimChat messaging into broader automation pipelines without manual intervention.

Properties

Name Meaning
Bearer Token The API authentication token used to authorize requests to NimChat.
Account ID Numeric identifier of the NimChat account where the message or file will be sent.
Inbox ID Numeric identifier of the specific inbox within the NimChat account to target.
Action Choose between "Send Message" (send a text message) or "Send File" (send a file).
Content The text content of the message to send.
To Numeric identifier of the recipient user who will receive the message or file.
Binary File (Shown only if Action is "Send File") The name of the binary property containing the file data to send. Defaults to "data".

Output

The node outputs a JSON array containing the response from the NimChat API after sending the message or file. This response typically includes details about the created message, such as its ID, status, timestamps, and any metadata returned by NimChat.

If sending a file, the node uploads the binary data from the specified input property but does not output binary data itself; instead, it returns the API's JSON response confirming the upload.

Dependencies

  • Requires access to the NimChat API endpoint https://app.nim.chat/api/v1/accounts/{accountId}/inboxes/{inboxId}/messages.
  • Needs a valid Bearer Token for API authentication.
  • Uses n8n's built-in HTTP request helper methods.
  • For sending files, requires the binary data to be available in the specified binary property of the input item.

Troubleshooting

  • Authentication errors: Ensure the Bearer Token is correct and has sufficient permissions.
  • Invalid IDs: Verify that Account ID, Inbox ID, and recipient user ID ("To") are accurate and exist in NimChat.
  • Missing binary data: When sending files, confirm that the binary property name matches the actual binary input and contains valid file data.
  • API errors: Check the response message for details; common issues include rate limits, invalid parameters, or network connectivity problems.
  • Empty content: When sending messages, ensure the "Content" field is not empty unless intentionally sending blank messages.

Links and References

  • NimChat API Documentation (Assumed official docs for further API details)
  • n8n HTTP Request Node documentation for understanding request options and binary data handling.

Discussion