Back to Nodes

MegaAPI

Last updated Sep 23, 2025

n8n community node package for integrating MegaAPI (WhatsApp service) with Chatwoot for customer support automation

21 Weekly Downloads
87 Monthly Downloads

Included Nodes

MegaAPI

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
  • Chatwoot Integration

  • πŸ‘₯ 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
  • πŸ“¦ 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

  • 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)
  • πŸ› οΈ Configuration

    1. MegaAPI Credentials

    Create a new credential in n8n:

  • Credential Type: MegaAPI
  • Base URL: Your MegaAPI instance URL
  • Token: Your MegaAPI authentication token
  • 2. Chatwoot Credentials (Optional)

    Create a new credential in n8n:

  • Credential Type: Chatwoot API
  • URL: Your Chatwoot instance URL
  • Token: Your Chatwoot API access token
  • 3. Combined Credentials (For Integration)

    Create a new credential in n8n:

  • 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
  • πŸ“‹ Available Operations

    Message Operations

  • 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
  • Instance Operations

  • 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
  • Webhook Operations

  • Configure: Set up webhook URLs for receiving WhatsApp events
  • Parser Operations

  • Parse Message: Parse and normalize WhatsApp message formats
  • Chatwoot Integration Operations

  • Sync Contacts: Synchronize WhatsApp contacts with Chatwoot
  • Process Webhooks: Handle incoming MegaAPI webhooks and route to Chatwoot
  • Create Conversations: Automatically create Chatwoot conversations
  • 🎯 Use Cases

    Customer Support Automation

    `
    WhatsApp Message β†’ MegaAPI β†’ n8n β†’ Chatwoot β†’ Agent
    `

  • Route incoming WhatsApp messages to Chatwoot agents
  • Automatically create conversations from new contacts
  • Sync contact information between platforms
  • Handle media attachments (images, documents, videos)
  • Marketing & Engagement

    `
    Trigger β†’ n8n β†’ MegaAPI β†’ WhatsApp Users
    `

  • 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
  • Development & Testing

    `
    HTTP Request β†’ n8n β†’ MegaAPI β†’ WhatsApp β†’ Response Processing
    `

  • Test WhatsApp integrations in n8n environment
  • Debug message flows and webhook processing
  • Validate API responses and error handling
  • πŸ“– 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

  • πŸ” 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
  • πŸš€ 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)
    3. Commit your changes (
    git commit -m ‘Add amazing feature’)
    4. Push to the branch (
    git push origin feature/amazing-feature`)
    5. Open a Pull Request

    πŸ“ License

    This project is licensed under the MIT License – see the LICENSE.md file for details.

    πŸ†˜ Support

  • Documentation: n8n Community Nodes Documentation
  • Issues: GitHub Issues
  • n8n Community: n8n Community Forum
  • πŸ”— Links

  • npm Package: n8n-nodes-megaapi-chatwoot
  • GitHub Repository: CommunityNodesChatwootMegaapi
  • MegaAPI Documentation: Contact your MegaAPI provider
  • Chatwoot Documentation: Chatwoot Docs
  • ⚠️ Important Notes

  • 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

—

Made with ❀️ by Script7Sistemas

Automate your WhatsApp customer support with n8n, MegaAPI, and Chatwoot!

From our network Other tools and sites we build