Overview
This node uploads a file to a specified Rocket.Chat room, optionally including a message, description, and thread ID. It supports targeting the room either by free text input (room ID, channel, or username) or by selecting from a list of rooms. The node processes binary file data from the input and sends it to the Rocket.Chat server, making it useful for automating file sharing in chat rooms or direct messages.
Use Case Examples
- Automatically upload a report file to a project channel with a message.
- Send an image file to a user via direct message with a description.
- Upload a document to a team group and attach it to a specific thread.
Properties
| Name | Meaning |
|---|---|
| Target Mode | Determines how the target room is specified, either by free text or by picking from a list of rooms. |
| Room | The target room specified as free text (room ID, channel, or username). Shown only if Target Mode is 'text'. |
| Room Picker | The target room selected from a list of rooms. Shown only if Target Mode is 'pickerRoom'. |
| Binary Property | The name of the binary property in the input item that contains the file to upload. |
| Message (optional) | An optional message to include with the file upload. |
| Description (optional) | An optional description to include with the file upload. |
| Thread ID (tmid) | An optional thread ID to associate the file upload with a specific thread in the room. |
Output
JSON
json- The JSON response from the Rocket.Chat API after uploading the file, containing details about the uploaded file and message.
Dependencies
- Requires Rocket.Chat API access with a personal access token credential for authentication.
Troubleshooting
- Error 'Item X is missing binary property: Y' occurs if the specified binary property is not found in the input item. Ensure the input item contains the binary data under the correct property name.
- If the room ID or name is invalid or not accessible, the upload will fail. Verify the room identifier or selection is correct and the API token has permission to post in that room.
- Network or authentication errors may occur if the Rocket.Chat API endpoint or credentials are misconfigured. Check API URL and token validity.