Package Information
Downloads: 212 weeklyΒ /Β 17,897 monthly
Latest Version: 1.3.1
Author: JΓΊnior
Available Nodes
Documentation
π N8N Community Nodes - MegaAPI
Complete WhatsApp Business automation solution for n8n workflows.
This community node package integrates MegaAPI (WhatsApp service) with Chatwoot for seamless customer support automation, providing custom nodes for n8n workflows that enable WhatsApp message handling, media management, group operations, and customer service integration.
π Features
WhatsApp Operations
- β Text Messages: Send and receive text messages
- β Media Messages: Send images, videos, documents, and audio files
- β Location Sharing: Send location coordinates and live location
- β Link Previews: Send messages with rich link previews
- β List Messages: Interactive list messages for better UX
Group Management
- β Group Operations: Create, manage, and configure groups
- β Participant Management: Add, remove, and manage group members
- β Group Messaging: Send messages to groups with media support
Instance Management
- β QR Code Generation: Generate QR codes for WhatsApp Web connection
- β Pairing Codes: Generate pairing codes for device linking
- β Status Monitoring: Real-time instance status and health checks
- β Webhook Configuration: Configure and manage webhooks
Chatwoot Integration
- β Contact Synchronization: Sync WhatsApp contacts with Chatwoot
- β Conversation Management: Create and manage customer conversations
- β Message Routing: Automatic message routing to Chatwoot agents
- β Webhook Processing: Complete MegaAPI β Chatwoot automation
Advanced Features
- β Message Forwarding: Forward messages between contacts and groups
- β Message Quoting: Reply to specific messages with context
- β Presence Updates: Manage online/offline status and typing indicators
- β Media Download: Download and process received media files
π¦ Installation
NPM Installation
npm install n8n-nodes-megaapi
N8N Community Package Installation
- Open your n8n instance
- Go to Settings β Community Nodes
- Enter package name:
n8n-nodes-megaapi - Click Install
Manual Installation
# Navigate to your n8n installation directory
cd ~/.n8n/nodes
# Clone or download the package
git clone https://github.com/megaapi/n8n-nodes-megaapi.git
# Install dependencies
npm install
# Build the package
npm run build
π§ Configuration
MegaAPI Credentials
- Create a MegaAPI Credentials in n8n
- Add your MegaAPI base URL and authentication token
- Test the connection
Chatwoot Integration
- Create Chatwoot MegaAPI Credentials for integrated workflows
- Configure both MegaAPI and Chatwoot API details
- Set up account ID and inbox ID
Required Information
- MegaAPI Base URL: Your MegaAPI instance URL
- MegaAPI Token: Authentication token from MegaAPI
- Chatwoot URL: Your Chatwoot instance URL (for integration)
- Chatwoot Token: API access token from Chatwoot (for integration)
π― Use Cases
Customer Support Automation
- Route WhatsApp messages to Chatwoot agents automatically
- Create conversations and contacts from new WhatsApp interactions
- Handle media attachments in customer support workflows
- Maintain conversation history and context
Business Communication
- Send bulk WhatsApp messages for marketing campaigns
- Automate order confirmations and shipping notifications
- Handle customer inquiries with intelligent routing
- Manage group communications for teams
E-commerce Integration
- Send order confirmations via WhatsApp
- Provide customer support through messaging
- Automate product inquiries and responses
- Handle refunds and support requests
Team Collaboration
- Create WhatsApp groups for project teams
- Automate status updates and notifications
- Share files and media with team members
- Manage participant access and permissions
π Available Nodes
Message Operations
- Send Text Message: Send text messages to contacts
- Send Media URL: Send media files via URL
- Send Media Base64: Send media files via base64 encoding
- Send Location: Share location coordinates
- Send Link Preview: Send messages with rich previews
- Send List Message: Send interactive list messages
- Forward Message: Forward existing messages
- Quote Message: Reply to messages with context
- Send Text Direct from Chatwoot: Direct text messaging from Chatwoot data
- Send Media Direct from Chatwoot: Direct media messaging from Chatwoot data
Group Operations
- Get Groups: List all available groups
- Group Details: Get detailed group information
- Create Group: Create new WhatsApp groups
- Send Group Message: Send messages to groups
- Send Group Media: Send media to groups
- Add Participants: Add members to groups
- Remove Participants: Remove members from groups
- Leave Group: Leave from groups
Instance Management
- Generate QR Code: Get QR code for WhatsApp Web
- Generate Pairing Code: Get pairing code for devices
- Instance Status: Check connection status
- Logout Instance: Disconnect WhatsApp session
- Restart Instance: Restart WhatsApp connection
Webhook & Media
- Download Media: Download received media files
- Check WhatsApp: Verify if number is on WhatsApp
- Get Webhook Config: Retrieve webhook configuration
- Configure Webhook: Set up webhook endpoints
Chat Operations
- Update Presence: Manage online/typing status
- Delete Message: Delete sent messages
- Delete Message From Me: Delete messages from sender
Chatwoot Integration
- Process Webhook to Chatwoot: Complete automation pipeline
- Send Message to Chatwoot: Send messages to Chatwoot conversations
- Sync Contact: Synchronize contacts between platforms
- Create Conversation: Create new Chatwoot conversations
π οΈ Development
Requirements
- Node.js 20.15 or higher
- n8n 1.54.4 or higher
- TypeScript 5.8.2 or higher
Build Commands
# Install dependencies
npm install
# Build the project
npm run build
# Development mode with watch
npm run dev
# Run linting
npm run lint
# Fix linting issues
npm run lintfix
# Format code
npm run format
# Prepare for publishing
npm run prepublishOnly
Project Structure
n8n-nodes-megaapi/
βββ π nodes/MegaAPI/ # Main node implementation
β βββ π MegaApi.node.ts # Node definition and routing
β βββ π execute/ # Operation implementations
β β βββ π message/ # Message operations
β β βββ π group/ # Group operations
β β βββ π instance/ # Instance management
β β βββ π webhook/ # Webhook operations
β β βββ π chat/ # Chat operations
β β βββ π chatwoot/ # Chatwoot integration
β βββ π properties/ # Node property definitions
βββ π credentials/ # Authentication configurations
βββ π package.json # Package configuration
βββ π tsconfig.json # TypeScript configuration
βββ π gulpfile.js # Build configuration
π License
This project is licensed under the MIT License - see the LICENSE.md file for details.
π€ Contributing
We welcome contributions! Please feel free to submit issues, feature requests, or pull requests.
Development Setup
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/n8n-nodes-megaapi.git - Install dependencies:
npm install - Make your changes
- Run tests:
npm run lint && npm run build - Submit a pull request
π Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: megaapi@github.com
π Changelog
v1.1.2 - Current
- β
Added
syncContactoperation for Chatwoot integration - β
Added
createConversationoperation for Chatwoot workflows - β Improved error handling and validation
- β Enhanced TypeScript type definitions
- β Updated build and deployment pipeline
v1.1.0
- β
Added
processWebhookToChatwootfor complete automation - β Enhanced Chatwoot integration capabilities
- β Improved webhook processing
v1.0.9
- β
Added
sendMessageToChatwootoperation - β Enhanced Chatwoot API integration
v1.0.8
- β
Added
sendTextFromChatwootDirectoperation - β Improved direct messaging capabilities
v1.0.7
- β
Added
sendMediaFromChatwootDirectoperation - β Enhanced media handling for Chatwoot integration
Made with β€οΈ for the n8n community