Package Information
Downloads: 2 weeklyĀ /Ā 15 monthly
Latest Version: 0.2.0
Author: Brian Tafoya & ChatGPT
Documentation
n8n-nodes-rocket-chat
A comprehensive n8n community node for Rocket.Chat integration, enabling powerful chat automation workflows.
š Features
Core Capabilities
- Send Messages: Post messages to channels, groups, and direct messages
- File Upload: Upload files to rooms with optional message attachments
- Message Management: Update and delete existing messages
- Direct Messaging: Open DM channels and send private messages
- Real-time Triggers: Receive messages via webhook, polling, or WebSocket
Three Powerful Nodes
š„ Rocket.Chat Message
Complete message management with advanced targeting options:
- Operations: Post, Send (advanced), Update, Delete messages
- Direct Messages: Open DM channels and send private messages
- Flexible Targeting: Text input (#channel/@user/roomId) or dropdown selectors
- Rich Features: Thread replies, custom avatars, emoji support, attachments
š Rocket.Chat File
Seamless file upload capabilities:
- Upload files to any room (channels, groups, DMs)
- Optional message text with file uploads
- Flexible room targeting options
- Support for various file types
ā” Rocket.Chat Trigger
Multiple ways to receive messages:
- Webhook: Real-time HTTP webhook integration
- Polling: Regular API polling for new messages
- WebSocket: Real-time stream for instant message reception
- Configurable room filtering and message processing
š¦ Installation
Option 1: n8n Community Nodes (Recommended)
- Go to Settings ā Community Nodes in your n8n instance
- Install:
n8n-nodes-rocket-chat - Restart n8n
Option 2: Manual Installation
# Install in your n8n installation directory
npm install n8n-nodes-rocket-chat
# For self-hosted n8n
cd ~/.n8n/nodes
npm install n8n-nodes-rocket-chat
Option 3: Docker
Add to your n8n Docker environment:
docker run -it --rm \
-p 5678:5678 \
-e N8N_NODES_INCLUDE="n8n-nodes-rocket-chat" \
n8nio/n8n
š§ Configuration
Credentials Setup
- In Rocket.Chat, go to Administration ā Personal Access Tokens
- Create a new Personal Access Token
- In n8n, create new Rocket.Chat PAT credentials:
- Base URL: Your Rocket.Chat server URL (e.g.,
https://open.rocket.chat) - User ID: Your Rocket.Chat user ID
- Auth Token: The personal access token from step 2
- Default Target (optional): Default channel/user for messages
- Base URL: Your Rocket.Chat server URL (e.g.,
API Permissions
Ensure your Rocket.Chat user has appropriate permissions:
chat.postMessage- Send messageschat.update- Update messageschat.delete- Delete messagesupload-file- Upload filesim.open- Open direct messages
šÆ Usage Examples
Basic Message Sending
// Send a message to #general channel
{
"operation": "post",
"target": "#general",
"text": "Hello from n8n! š"
}
File Upload with Message
// Upload file to a room
{
"targetMode": "text",
"target": "#announcements",
"message": "Weekly report attached",
"file": "{{ $binary.file }}"
}
Real-time Message Trigger
// WebSocket trigger configuration
{
"mode": "realtime",
"rooms": ["GENERAL", "random"],
"includeAll": false
}
Direct Message Workflow
// Open DM and send message
{
"operation": "sendDm",
"dmUsername": "john.doe",
"text": "Your task has been completed ā
"
}
š Development
Prerequisites
- Node.js 18+
- TypeScript 5+
- n8n development environment
Build from Source
# Clone repository
git clone https://github.com/your-repo/n8n-nodes-rocket-chat.git
cd n8n-nodes-rocket-chat
# Install dependencies
npm install
# Build
npm run build
# Development mode
npm run dev
Project Structure
āāā credentials/ # Authentication credentials
ā āāā RocketChatPat.credentials.ts
āāā nodes/ # Node implementations
ā āāā RocketChatMessage.node.ts
ā āāā RocketChatFile.node.ts
ā āāā RocketChatTrigger.node.ts
āāā transport/ # API utilities
ā āāā GenericFunctions.ts
āāā dist/ # Compiled output
š API Reference
Rocket.Chat REST API Endpoints Used
POST /api/v1/chat.postMessage- Send messagesPOST /api/v1/chat.sendMessage- Send messages (advanced)POST /api/v1/chat.update- Update messagesPOST /api/v1/chat.delete- Delete messagesPOST /api/v1/rooms.upload- Upload filesPOST /api/v1/im.open- Open direct messagesGET /api/v1/channels.list.joined- List channelsGET /api/v1/groups.list- List private groupsGET /api/v1/im.list- List direct messages
WebSocket Realtime API
stream-room-messages- Real-time message streaming
š¤ Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Commit:
git commit -m 'feat: add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Support & Issues
- Documentation: n8n Community Nodes Docs
- Issues: GitHub Issues
- Rocket.Chat API: Official API Documentation
š Acknowledgments
- Built with ā¤ļø for the n8n community
- Powered by Rocket.Chat API
- Compatible with n8n workflow automation platform
Made possible by: n8n | Rocket.Chat