Documentation

@clubmega/n8n-nodes-mega

npm version
npm downloads

This is an n8n community node that lets you use MEGA in your n8n workflows.

See MEGA API coverage for the current resource matrix, output contract and deliberate exclusions.

MEGA is a customer engagement platform that helps businesses manage customer conversations across multiple channels. This node provides comprehensive integration with the MEGA API, allowing you to automate customer support workflows, manage contacts, handle conversations, and more.

n8n is a fair-code licensed workflow automation platform.

Installation
Nodes
Operations
Credentials
Compatibility
Usage
Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

Use this package name to install:

@clubmega/n8n-nodes-mega

Nodes

This package includes two nodes:

MEGA

The main node for interacting with the MEGA API. Supports all CRUD operations for managing your MEGA instance.

MEGA Trigger

A webhook trigger node that listens for MEGA events. Automatically registers and manages webhooks in your MEGA instance.

Operations

Account

Operation Description
Create Create a new MEGA account (Platform API)
Delete Delete a MEGA account (Platform API)
Get Retrieve detailed information about a specific MEGA account
Update Update a MEGA account (Platform API)

Account User

  • Create: Associate a user with an account (Platform API)
  • Delete: Remove a user from an account (Platform API)
  • List: List all users associated with an account (Platform API)

Agent

Operation Description
Create Add a new agent to account
Delete Remove an agent from account
List List all agents in account
Update Update an agent in account

In Agent create and update, the Role dropdown includes account custom roles.
Selecting a custom role sends custom_role_id automatically.

Agent Bot

Operation Description
Create Create a new agent bot (Platform API)
Delete Delete an agent bot (Platform API)
Get Get details of an agent bot (Platform API)
List List all agent bots (Platform API)
Update Update an agent bot (Platform API)

Agent Bot (Account)

Operation Description
Create Create a new agent bot (webhook or typebot)
Delete Delete an agent bot from the account
Delete Avatar Remove the avatar of an agent bot
Get Get details of an agent bot
List List agent bots filtered by type (webhook or typebot)
Reset Access Token Regenerate the access token of an agent bot
Reset Secret Generate a new webhook signing secret
Update Update an agent bot (name, type, config, etc.)

Supports two bot types: Webhook (receives events via URL) and Typebot (powered by Typebot with trigger configuration). When creating a Typebot, you can configure the API URL, public name, trigger type (all/keyword), and keyword matching options.

Applied SLA

Operation Description
Get Many List conversations with an applied SLA (filters by date, inbox, team, policy, agent, label)
Get Metrics Applied SLA totals, misses and hit rate

Audit Log

Operation Description
Get Many List audit logs by user, record type and date (Audit Logs feature, admin)

Automation Rule

Operation Description
Clone Clone an existing automation rule
Create Create a new automation rule
Delete Delete an automation rule
Get Get a specific automation rule
List List all automation rules
Update Update an automation rule

The Create operation uses visual builders for conditions and actions:

Trigger Events: Conversation Created, Conversation Opened, Conversation Resolved, Conversation Updated, Message Created.

Condition Builder — Add one or more conditions, each with:

  • Attribute (18 options): Status, Priority, Assignee, Team, Inbox, Labels, Email, Phone Number, Content, Message Type, Country, Browser Language, Conversation Language, City, Company, Referer, Mail Subject, Contact Label.
  • Operator (10 options): Equal To, Not Equal To, Contains, Does Not Contain, Starts With, Is Present, Is Not Present, Is Greater Than, Is Less Than, Days Before.
  • Values: Contextual dropdowns — multi-select for Status, Priority, and Message Type; free-text for all other attributes.
  • Condition Logic: Combine all conditions with AND (all must match) or OR (any can match).

Action Builder — Add one or more actions (21 types), each showing contextual parameter fields:

Action Parameter
Change Status Status dropdown (Open, Pending, Resolved, Snoozed)
Change Priority Priority dropdown (None, Low, Medium, High, Urgent)
Assign Agent Agent ID
Assign Team Team ID
Add / Remove Label Label names
Add / Remove Contact Label Label names
Send Message / Add Private Note Message text
Send Email to Team / Send Email Transcript Email address
Send Webhook Event Webhook URL
Send Attachment File URL
Sleep (Minutes) Number of minutes
Mute, Open, Pending, Resolve, Snooze, Redistribute (no parameters)

Calendar Event

Operation Description
Get Many List events by date range, status, source, contact, conversation or Kanban item
Get / Create / Update Read and write events linked to contacts, conversations and Kanban items
Cancel Mark an event as cancelled
Delete Delete an event permanently, including its Google Calendar copy
Sync to Google Calendar Push an event to Google Calendar

Google Calendar Integration / Sync

Resource Operations
Google Calendar Integration Get Status, Connect, Reconnect, Get Calendars, Update Calendar Connection, Update Modules, Import Events, Backfill Kanban, Disconnect
Google Calendar Sync Get Sync Status, Sync to Google, Sync From Google, Remove From Google, Toggle Sync, Bulk Sync, Get/Reset Circuit

Campaign

Operation Description
Create Create a new campaign
Delete Delete a campaign
Get Get a specific campaign
List List all campaigns
Pause Pause a campaign
Resume Resume a paused campaign
Update Update a campaign

Canned Response

Operation Description
Create Create a new canned response
Delete Delete a canned response
List List all canned responses
Update Update a canned response

Captain (AI)

Captain resources need the Captain feature on the account.

Resource Operations
Captain: Assistant Get Many, Get, Create, Update, Delete, Ask (get the assistant's answer to a message), List/Connect/Disconnect Inboxes
Captain: FAQ Get Many (assistant, document, text), Get, Create, Update, Delete
Captain: Document Get Many, Get, Create From URL, Sync, Delete
Captain: Scenario Get Many, Get, Create, Update, Delete (per assistant)
Captain: AI Task Summarize Conversation, Suggest Reply, Suggest Labels, Rewrite Text, Refine Result
Captain: Copilot List Threads, Start Thread, List Messages, Send Message (answers arrive in the background)

Chat Room

Operation Description
Create Create a new chat room
Delete Delete a chat room
Get Get a specific chat room
List List all chat rooms
Update Update a chat room
Mark as Read Mark a chat room as read
Add Members Add an agent to a chat room (agent selector)
Remove Members Remove an agent from a chat room
Get Members List members of a chat room
List Messages List messages in a chat room
Send Message Send a text message with optional reply-to
Send File Send a file/attachment in a chat room with optional caption

Company

Operation Description
Create / Get / Get Many / Update / Delete Company CRUD (JSON body)
Search Search companies by name or domain
List Contacts List the contacts of a company
Add Contact Link a contact to a company
Remove Contact Unlink a contact from a company
List Conversations List the conversations of the company contacts
List Notes List the notes of the company contacts

Contact

Operation Description
Create Create a new contact with name, phone (E.164 format), email, and custom attributes
Get Get contact information
Update Update contact details
Delete Delete a contact
List List contacts with pagination
Search Search for contacts by query
Set Custom Attributes Set custom attributes on a contact
Destroy Custom Attributes Remove all custom attributes from a contact
Filter Filter contacts using advanced query rules (JSON)
List Online List contacts online in the live chat widget
List Contactable Inboxes List the inboxes that can start a conversation with the contact
Create Contact Inbox Link the contact to an inbox, optionally with a source ID
List Attachments List files shared in all conversations with the contact

Create and Update also accept Ignore Greeting, Ignore CSAT and Ignore Agent Name. They skip the inbox greeting, the CSAT survey and the agent name prefix for that contact, and only apply to Evolution, WAHA and UAZAPI WhatsApp inboxes.

Contact Note

Operation Description
Create Create a note on a contact
Delete Delete a contact note
Get Get a specific contact note
List List all notes for a contact
Update Update a contact note

Conversation

Operation Description
Create Create a new conversation for a contact
Get Get a specific conversation
List List conversations with filters
Filter Filter conversations using advanced query rules
Send Message Send a text message in a conversation
Send with Template Send a WhatsApp template message
Send File Send a file/attachment in a conversation
List Messages List messages in a conversation with pagination
Delete Message Delete a message and its attachments
Update Message Status Report sent/delivered/read/failed for a message (API channel inboxes only)
List Attachments List attachments in a conversation
Download Attachment Download an attachment from a conversation message
Assign Agent Assign an agent to a conversation
Assign Team Assign a team to a conversation
List Labels List all labels of a conversation
Add Labels Append labels to a conversation (keeps existing)
Remove Labels Remove specific labels from a conversation
Update Labels Replace all labels on a conversation
Toggle Status Change status (open, pending, resolved, snoozed)
Set Priority Set conversation priority
Add Custom Attributes Add custom attributes (keeps existing)
Remove Custom Attributes Remove specific custom attributes
Set Custom Attributes Replace all custom attributes
Update Last Seen Update the last seen timestamp
Update Presence Set presence status (off, typing, recording)
Mark Unread Mark conversation as unread
Bulk Update Read State Mark up to 100 conversations as read or unread
Mute Mute a conversation
Unmute Unmute a conversation
Pin Pin a conversation for the current user
Unpin Unpin a conversation for the current user
Send Transcript Send conversation transcript to an email address
Delete Delete a conversation permanently
Edit Message Edit a sent WhatsApp message (Evolution, WAHA, UAZapi; 15-minute window)
Forward Message Forward a message to other contacts (agent token)
Retry Message Send a failed message again
Translate Message Translate a message with Google Translate
React to Message Add, replace or remove your emoji reaction
Transcribe Audio Transcribe the audio attachments of a message
Fetch Pending Media Download WAHA media that arrived without the file
Get Message Context Get the messages around a message
Search Messages Search messages by text, date and type
Get AI Suggestions Captain label, contact label or priority suggestions
List/Add/Set/Remove Participants Manage the agents participating in a conversation
Get/Set/Delete Draft Manage the current user's reply draft
Get Counts Count mine, assigned, unassigned, unread and all conversations
Get Unread Counts Unread counts per inbox, label and team (agent token)
Search Search conversations by contact, content or ID

WhatsApp Cloud templates

Send with Template lists only templates approved for the selected inbox. List selections preserve both the template name and language; a saved workflow that contains only the legacy template name continues to work when that name identifies exactly one approved language.

Approved templates containing component types or header formats that this node cannot safely serialize are omitted from the selector, while other compatible templates continue to load.

Guided Inputs is the default. After selecting Account, Inbox and Template, n8n reloads Template Values and shows one field for each value required by that exact approved template. For example, an IMAGE header plus hola {{1}} shows Header image URL and Variable — {{1}}; footer text, call permission and static buttons remain informational and never create editable fields. Values accept n8n expressions normally.

For header media, enter a public URL in the generated field or enter binary:data (replacing data with the n8n binary property name). Document templates generate one additional optional filename field; image and video templates do not. Switch Input Mode to Advanced Components for typed date-time values, low-level troubleshooting or explicit component control. Workflows saved by earlier versions with Components continue to execute through the legacy parser even though Guided Inputs is now the default.

Add the dynamic components shown in Template Structure:

  • For positional body variables such as {{1}}, add values in numeric order. For named variables such as {{customer_name}}, also enter the exact Parameter Name.
  • A Date Time value is sent as WhatsApp's enhanced date_time object and requires a human-readable fallback value. Use Advanced Components for manual date-time entry; guided expressions may also return { "type": "date_time", "value": "2026-07-11T12:00:00Z", "fallback_value": "July 11, 2026" }.
  • IMAGE, VIDEO and DOCUMENT headers accept an externally reachable HTTP(S) URL or an n8n binary field. Literal local/private/link-local addresses are rejected, but the node does not perform DNS resolution. Binary input is uploaded to MEGA only after the full template input validates; documents may include a safe filename displayed by WhatsApp.
  • Add only dynamic URL or Copy Code buttons and use their actual zero-based template index, including indexes after static buttons.

Example processed parameters for a document template:

{
  "body": { "customer_name": "Ana" },
  "header": {
    "media_url": "https://files.example.com/invoice.pdf",
    "media_type": "document",
    "media_name": "invoice.pdf"
  },
  "buttons": [
    { "type": "quick_reply" },
    { "type": "url", "parameter": "order-42" }
  ]
}

The operation returns the MEGA message record after it is created. WhatsApp delivery is asynchronous, so a successful node execution does not by itself confirm delivery; inspect the later message status or delivery/error events in MEGA.

CSAT Response

Operation Description
Get Many List CSAT responses by date, inbox, team, agent and rating
Get Metrics Responses, ratings and surveys sent
Add Review Notes Save review notes on a response

Custom Attribute

Operation Description
Create Create a custom attribute definition (text, number, date, list, checkbox, link)
List List all custom attribute definitions
Delete Delete a custom attribute definition

Custom Role

Operation Description
Create Create a custom role in the account
Delete Delete a custom role from the account
Get Get details of a custom role
List List all custom roles in the account
Update Update a custom role and its permissions

Help Center Article / Category

Both work inside a portal, identified by its slug.

Operation Description
Get Many List articles (search, locale, category, status, author) or categories
Get / Create / Update / Delete Manage articles (draft unless a status is given) and categories

Inbox

Operation Description
Get Get information about a specific inbox
List List all inboxes in an account
Rotate HMAC Token Generate a new identity validation token (website and API inboxes)
List Assignable Agents List agents that can take conversations in the inbox
Get / Set Agent Bot Read or change the agent bot connected to the inbox
Get Health Provider health of WhatsApp Cloud, Notificame and Twilio SMS inboxes
List Campaigns List the campaigns of the inbox
Get / Create CSAT Template Read or create the WhatsApp CSAT survey template
Sync Templates Refresh WhatsApp message templates from the provider
On WhatsApp ⚡ Check if a phone number is registered on WhatsApp
WhatsApp Disconnect ⚡ Disconnect a WhatsApp inbox
WhatsApp Get QR Code ⚡ Get QR code for WhatsApp inbox connection

⚡ These operations are only available with MEGA

Kanban Automation

Operation Description
Create Create an account-scoped Kanban automation
Get Get an account-scoped Kanban automation
List List account-scoped Kanban automations
Update Update an account-scoped Kanban automation
Delete Delete an account-scoped Kanban automation
Create (Legacy Global) Create a legacy global Kanban automation
Get (Legacy Global) Get a legacy global Kanban automation
List (Legacy Global) List legacy global Kanban automations
Update (Legacy Global) Update a legacy global Kanban automation
Delete (Legacy Global) Delete a legacy global Kanban automation

Kanban Config

Operation Description
Get Get current Kanban configuration
Create Create Kanban configuration
Update Update Kanban configuration
Delete Delete Kanban configuration

Kanban Funnel

Operation Description
Create Create a Kanban funnel
Get Get a Kanban funnel
List List Kanban funnels
Update Update a Kanban funnel
Delete Delete a Kanban funnel
Stage Stats Get per-stage metrics for a funnel
Reorder Stages Reorder stage positions in a funnel
List Items List Kanban items from a funnel

Kanban Item

  • CRUD + movement: List, Batch, Get, Create, Update, Delete, Move to Stage, Move, Reorder
  • Search + reports: Search, Filter, Reports, Report Export (CSV), Debug, Export CSV
  • Checklist: Create/Get/Update/Toggle/Delete checklist tasks, assign/remove agent, duplicate, search, progress by agent
  • Notes: Create/Get/Update/Delete notes
  • Attachments: List/Upload/Delete item attachments and note attachments
  • Assignment: Assign/Remove/Get assigned agents
  • Timing + status: Change status, Time Report, Stage Time Breakdown, Counts
  • Bulk: Bulk Move Items, Bulk Assign Agent, Bulk Set Priority
  • CSV import: Import Preview, Import CSV (binary file input)

Kanban Stage

  • List: List stages by funnel
  • Get: Get stage details
  • Create: Create a stage in a funnel
  • Update: Update stage data
  • Delete: Delete a stage and optionally move items to a fallback stage

Kanban UX Notes

  • Kanban resources use a guided-first UX for common fields and filters.
  • Advanced JSON fields are hidden by default and can be revealed using Show Advanced JSON Options.
  • In Kanban Item and Kanban Funnel, advanced query/body JSON overrides guided values when both are provided.
  • Kanban Item Create and Update accept funnel Custom Attributes as name/value pairs. On Update, attributes you don't send keep their stored values.
  • In Kanban Stage, Kanban Config, and Kanban Automation, create/update payloads are provided through the advanced JSON field.

Label

Operation Description
Create Create a new label
List List all labels
Update Update a label
Delete Delete a label

Macro

Operation Description
Create / Get / Get Many / Update / Delete Macro CRUD (JSON body)
Execute Run a macro on conversations (by display ID), in the background

Notification

Operation Description
Get Many / Update / Delete Notification CRUD
Mark All as Read Mark all notifications as read
Mark as Unread Mark a notification as unread
Snooze Snooze a notification until a date
Get Unread Count Count unread notifications
Delete All Delete all or only read notifications

Notification operations act on the user that owns the access token.

Profile

Operation Description
Get Get the current user profile information

Message Template

Operation Description
Analytics Get template analytics data
Create Create a new message template
Delete Delete a message template
Delete Multiple Delete multiple message templates at once
Get Get a message template by ID
List List all message templates
Update Update a message template

Platform Banner

Operation Description
List List active platform banners
Dismiss Dismiss a platform banner

Platform banners allow system administrators to display important notifications or announcements to users across the platform. Users can view and dismiss banners they've seen.

Platform Banner (Platform API)

Operation Description
Create Create a new platform banner
Delete Delete a platform banner
Get Get a specific platform banner by ID
List List all active platform banners
Update Update a platform banner

Platform API operations require platform-level authentication and permissions. These operations are for system administrators to manage banners that will be displayed across all accounts.

The Feature Announcement type opens as a panel over the dashboard and requires a Video URL: a YouTube, Vimeo, Loom, Arcade, Bunny, Guidejar or CodePen link, or the link of an image or video file.

Scheduled Message

Operation Description
Cancel Cancel a pending scheduled message
Create Create a new scheduled message
Delete Delete a scheduled message
Get Get a single scheduled message by ID
Get Many Get all scheduled messages for the account
Update Update an existing scheduled message
Retry Retry a failed scheduled message
Reschedule Update and requeue a failed scheduled message
Resend Send a sent scheduled message again

Outbound Message

Operation Description
Send Send text, one binary file, or an approved WhatsApp Cloud template to a recipient without a conversation

Scheduled Outbound Message

Operation Description
Schedule Schedule text, binary media, or an approved WhatsApp template for a recipient without a conversation

Search

Operation Description
Search All Search contacts, conversations, messages and articles at once
Search Articles Search help center articles
Search Contacts Search contacts
Search Conversations Search conversations
Search Messages Search messages

Task (Activity) and Activity Type

Operation Description
Task: Get Many List tasks (open, overdue or by status, assignee, contact, type, Kanban item, text, dates)
Task: Get / Create / Update / Delete Manage tasks with activity type, assignee and participant dropdowns, priority, guests, recurrence and Google Calendar sync
Task: Get Report Totals by status, type and agent for a period
Activity Type: Get Many / Create / Update / Delete Manage the activity types used by tasks

Team

Operation Description
Create Create a new team
Delete Delete a team
List List all teams
Get Team Members Get all members of a team
Assign Agent Assign an agent to a team
Unassign Agent Remove an agent from a team

User

Operation Description
Create Create a new user (Platform API)
Delete Delete a user (Platform API)
Get Get details of a user (Platform API)
Get SSO Link Get a SSO login link for a user (Platform API)
Update Update a user (Platform API)

WhatsApp Group

Works on WhatsApp group conversations (Evolution, WAHA and UAZapi inboxes).

Operation Description
List Members List the group members
Search Members Search members by name or phone
Add Members Add participants by phone number
Remove Member Remove a participant
Update Member Role Promote to admin or demote to participant
Sync Members Refresh the member list from WhatsApp
Get Settings Get subject, description, owner, size and picture
Update Subject Rename the group
Update Description Change or clear the group description
Update Picture Set the group picture from a URL or base64
Delete Picture Remove the group picture
Get Invite Link Get the invite code and link
Revoke Invite Link Revoke the invite link and create a new one

Trigger Events

The MEGA Trigger node supports the following webhook events:

Event Description
Chat Room Message Created A message is posted in an internal chat room
Chat Room Message Deleted A chat room message is deleted
Chat Room Message Updated A chat room message is edited
Chat Room Updated A chat room is updated
Contact Created A new contact is created
Contact Updated A contact is updated
Conversation Created A new conversation is created
Conversation Status Changed A conversation status changes
Conversation Updated A conversation is updated
Conversation Typing On Someone starts typing
Conversation Typing Off Someone stops typing
Inbox Created A new inbox is created
Inbox Updated An inbox is updated
Live Chat Widget Opened A user opens the live chat widget
Message Created A new message is created, in either direction
Message Incoming A new message from a contact
Message Outgoing A new message sent by an agent, bot or template
Message Updated A message is updated

MEGA sends every new message as message_created. Message Incoming and Message Outgoing register that event and the trigger starts the workflow only for messages in the selected direction. Contact, inbox and chat room events are account-wide, so the Inbox filter does not apply to them.

Provider Event Received is still listed as deprecated so saved triggers open, but MEGA no longer sends it and the trigger ignores it.

Credentials

To authenticate with MEGA, you need:

1. MEGA API URL

The base URL of your MEGA instance (e.g., https://app.mega.com or your self-hosted URL).

2. Access Token

A Personal Access Token from your MEGA profile:

  1. Log in to your MEGA dashboard
  2. Go to Profile Settings (click your avatar → Profile settings)
  3. Navigate all the way down to Access Token
  4. Copy your token

The token is sent as the Api-Access-Token header with each request.

Compatibility

  • Minimum n8n version: 1.0.0
  • Tested with: n8n 1.x and n8n 2.34.5 (using n8n-workflow 2.34.2)
  • Node.js for n8n 2.34.5: 22.22 or later (n8n requirement)
  • MEGA version: Compatible with MEGA v4.x and later
  • MEGA exclusive features: WhatsApp provider operations, and additional webhook events

Usage

Basic Workflow: Auto-respond to New Conversations

  1. Add a Mega Trigger node
  2. Select your account and choose "Conversation Created" event
  3. Connect to a MEGA node
  4. Set resource to "Conversation" and operation to "Send Message"
  5. Use the conversation ID from the trigger output

Working with Contacts

The Contact resource supports E.164 phone number format validation (e.g., +5511999999999). You can also set social profiles and custom attributes when creating or updating contacts.

Using Resource Locators

All resources support two selection modes:

  • From List: Browse and search available items (accounts, inboxes, conversations, etc.)
  • By ID: Enter the ID directly for dynamic workflows

Custom Attributes

Custom attributes can be specified in three ways:

  1. Definition mode: Select from existing attribute definitions
  2. Key-pair mode: Enter key-value pairs manually
  3. JSON mode: Provide a JSON object for complex structures

AI Tool Usage

This node is enabled as an n8n AI tool (usableAsTool: true), allowing it to be used with AI agents for intelligent automation workflows.

Resources

License

MIT

Made with ❤️ by Mega

Node type IDs

From 0.14.0 the nodes are registered as @clubmega/n8n-nodes-mega.mega and @clubmega/n8n-nodes-mega.megaTrigger. Earlier versions used ...chatwoot and ...chatwootTrigger, which MEGA inherited from its original codebase and led AI assistants (for example through the n8n MCP server) to treat the node as Chatwoot.

The previous types are still installed as hidden aliases with the same parameters, so existing workflows, active triggers and credentials keep working without changes. New nodes added from the panel use the new types. Migrating an existing workflow is optional: replace @clubmega/n8n-nodes-mega.chatwoot with @clubmega/n8n-nodes-mega.mega (and chatwootTrigger with megaTrigger) in its JSON. Re-activate a migrated trigger workflow so it re-registers its webhook.

The Platform credential keeps its megaChatwootPlatformApi type name for the same compatibility reason; it is shown as MEGA Platform API.

Discussion