npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-megaapi

v1.3.1

Published

N8N Community Node for MegaAPI WhatsApp automation - Complete WhatsApp integration with messaging, groups, media, and more

Readme

MegaAPI Logo

🚀 N8N Community Nodes - MegaAPI

Version License N8N

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

  1. Open your n8n instance
  2. Go to SettingsCommunity Nodes
  3. Enter package name: n8n-nodes-megaapi
  4. 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

  1. Create a MegaAPI Credentials in n8n
  2. Add your MegaAPI base URL and authentication token
  3. Test the connection

Chatwoot Integration

  1. Create Chatwoot MegaAPI Credentials for integrated workflows
  2. Configure both MegaAPI and Chatwoot API details
  3. 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

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/your-username/n8n-nodes-megaapi.git
  3. Install dependencies: npm install
  4. Make your changes
  5. Run tests: npm run lint && npm run build
  6. Submit a pull request

📞 Support


🎉 Changelog

v1.1.2 - Current

  • ✅ Added syncContact operation for Chatwoot integration
  • ✅ Added createConversation operation for Chatwoot workflows
  • ✅ Improved error handling and validation
  • ✅ Enhanced TypeScript type definitions
  • ✅ Updated build and deployment pipeline

v1.1.0

  • ✅ Added processWebhookToChatwoot for complete automation
  • ✅ Enhanced Chatwoot integration capabilities
  • ✅ Improved webhook processing

v1.0.9

  • ✅ Added sendMessageToChatwoot operation
  • ✅ Enhanced Chatwoot API integration

v1.0.8

  • ✅ Added sendTextFromChatwootDirect operation
  • ✅ Improved direct messaging capabilities

v1.0.7

  • ✅ Added sendMediaFromChatwootDirect operation
  • ✅ Enhanced media handling for Chatwoot integration

Made with ❤️ for the n8n community