Description
n8n-nodes-megaapi-chatwoot
!npm version
!npm downloads
!license
An n8n community node package that integrates MegaAPI (WhatsApp service) with Chatwoot for seamless customer support automation. This package provides custom nodes for n8n workflows enabling WhatsApp message handling, media management, and Chatwoot integration.
π Features
MegaAPI Node Capabilities
- π± Message Operations: Send text messages, media messages (images, videos, documents)
- βοΈ Instance Management: Get instance status, QR codes, pairing codes
- π Media Handling: Download media messages, process multimedia content
- π§ Configuration: Configure webhooks, manage instance settings
- π Message Processing: Parse incoming messages, handle different message types
- π₯ Contact Synchronization: Sync WhatsApp contacts with Chatwoot
- π¬ Conversation Management: Create and manage conversations
- π Message Routing: Route WhatsApp messages to Chatwoot conversations
- π Webhook Processing: Process Chatwoot webhooks for automation
- Node.js: Version 20.15 or higher
- n8n: Latest version recommended
- MegaAPI Account: Valid API credentials
- Chatwoot Instance: Access to Chatwoot platform (optional for MegaAPI-only usage)
- Credential Type: MegaAPI
- Base URL: Your MegaAPI instance URL
- Token: Your MegaAPI authentication token
- Credential Type: Chatwoot API
- URL: Your Chatwoot instance URL
- Token: Your Chatwoot API access token
- Credential Type: Chatwoot MegaAPI
- MegaAPI URL: Your MegaAPI instance URL
- MegaAPI Token: Your MegaAPI authentication token
- Chatwoot URL: Your Chatwoot instance URL
- Chatwoot Token: Your Chatwoot API access token
- Send Text From Chatwoot: Send text messages using Chatwoot payload
- Send Text Direct From Chatwoot: Send text messages directly with automatic extraction
- Send Media From Chatwoot: Send media messages using URL or Chatwoot payload
- Send Media Direct From Chatwoot: Send media files directly with automatic extraction
- Send Media URL to Group: Send media messages to WhatsApp groups
- Get Status: Check WhatsApp instance connection status
- Get QR Code: Retrieve QR code for WhatsApp Web authentication
- Get Pairing Code: Get pairing code for phone number linking
- Download Media Message: Download media files from WhatsApp messages
- Configure: Set up webhook URLs for receiving WhatsApp events
- Parse Message: Parse and normalize WhatsApp message formats
- Sync Contacts: Synchronize WhatsApp contacts with Chatwoot
- Process Webhooks: Handle incoming MegaAPI webhooks and route to Chatwoot
- Create Conversations: Automatically create Chatwoot conversations
- Route incoming WhatsApp messages to Chatwoot agents
- Automatically create conversations from new contacts
- Sync contact information between platforms
- Handle media attachments (images, documents, videos)
- Send bulk WhatsApp messages through workflows
- Automate responses based on message content
- Manage WhatsApp instance status and connectivity
- Process incoming webhooks for real-time updates
- Test WhatsApp integrations in n8n environment
- Debug message flows and webhook processing
- Validate API responses and error handling
- π Credential Encryption: Uses n8n's built-in credential encryption
- π Token-based Authentication: Secure API authentication for all services
- π‘οΈ Environment Variable Support: Sensitive data stored securely
- π No Logging of Secrets: Credentials never appear in logs
- Documentation: n8n Community Nodes Documentation
- Issues: GitHub Issues
- n8n Community: n8n Community Forum
- npm Package: n8n-nodes-megaapi-chatwoot
- GitHub Repository: CommunityNodesChatwootMegaapi
- MegaAPI Documentation: Contact your MegaAPI provider
- Chatwoot Documentation: Chatwoot Docs
- This package integrates WhatsApp messaging with customer support platforms
- Use in compliance with WhatsApp Business API terms of service
- Ensure compliance with applicable data protection regulations
- Test thoroughly in development environment before production use
Chatwoot Integration
π¦ Installation
Option 1: Install via n8n Community Nodes (Recommended)
1. Go to Settings > Community Nodes in your n8n instance
2. Click Install a community node
3. Enter the package name: n8n-nodes-megaapi-chatwoot
4. Click Install
Option 2: Manual Installation
“bash
Install globally
npm install -g n8n-nodes-megaapi-chatwoot
For Docker installations, add to your Dockerfile:
RUN npm install -g n8n-nodes-megaapi-chatwoot
`
Option 3: Development Installation
`bash
Clone the repository
git clone https://github.com/madeinlowcode/CommunityNodesChatwootMegaapi.git
Install dependencies
cd CommunityNodesChatwootMegaapi
npm install
Build the project
npm run build
Set environment variable
export N8NCUSTOMEXTENSIONS=/path/to/CommunityNodesChatwootMegaapi
Start n8n
n8n start
`
π§ Prerequisites
π οΈ Configuration
1. MegaAPI Credentials
Create a new credential in n8n:
2. Chatwoot Credentials (Optional)
Create a new credential in n8n:
3. Combined Credentials (For Integration)
Create a new credential in n8n:
π Available Operations
Message Operations
Instance Operations
Webhook Operations
Parser Operations
Chatwoot Integration Operations
π― Use Cases
Customer Support Automation
``
WhatsApp Message β MegaAPI β n8n β Chatwoot β Agent
Marketing & Engagement
``
Trigger β n8n β MegaAPI β WhatsApp Users
Development & Testing
``
HTTP Request β n8n β MegaAPI β WhatsApp β Response Processing
π Example Workflows
Basic WhatsApp Message Sending
`json`
{
"name": "Send WhatsApp Message",
"nodes": [
{
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger"
},
{
"name": "MegaAPI",
"type": "n8n-nodes-megaapi-chatwoot.megaApi",
"parameters": {
"resource": "message",
"operation": "sendText",
"phoneNumber": "+1234567890",
"message": "Hello from n8n!"
}
}
],
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "MegaAPI",
"type": "main",
"index": 0
}
]
]
}
}
}
Chatwoot Integration Workflow
`json`
{
"name": "Chatwoot to WhatsApp",
"nodes": [
{
"name": "Chatwoot Webhook",
"type": "n8n-nodes-base.webhook"
},
{
"name": "MegaAPI",
"type": "n8n-nodes-megaapi-chatwoot.megaApi",
"parameters": {
"resource": "message",
"operation": "sendTextFromChatwootDirect"
}
}
]
}
π Security Features
π Development
Building from Source
`bash
Clone repository
git clone https://github.com/madeinlowcode/CommunityNodesChatwootMegaapi.git
cd CommunityNodesChatwootMegaapi
Install dependencies
npm install
Build project
npm run build
Run linting
npm run lint
Fix linting issues
npm run lintfix
Format code
npm run format
`
Project Structure
``
community/
βββ nodes/ # Custom n8n nodes
β βββ MegaAPI/ # Main MegaAPI WhatsApp integration
β β βββ MegaApi.node.ts # Main node implementation
β β βββ operations/ # Operation implementations
β β βββ types/ # TypeScript type definitions
β β βββ utils/ # Utility functions
β βββ Community/ # Community test node
βββ credentials/ # Authentication credentials
β βββ MegaApi.credentials.ts # MegaAPI auth
β βββ ChatwootApi.credentials.ts # Chatwoot API auth
β βββ ChatwootMegaApi.credentials.ts # Combined auth
βββ workflows/ # Example workflows
βββ docs/ # Documentation
π€ Contributing
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)git commit -m ‘Add amazing feature’
3. Commit your changes ()git push origin feature/amazing-feature`)
4. Push to the branch (
5. Open a Pull Request
π License
This project is licensed under the MIT License – see the LICENSE.md file for details.
π Support
π Links
β οΈ Important Notes
—
Made with β€οΈ by Script7Sistemas
Automate your WhatsApp customer support with n8n, MegaAPI, and Chatwoot!


