mega

MEGA integration with n8n

Package Information

Downloads: 941 weekly / 5,010 monthly
Latest Version: 0.11.0
Author: Nestor Davalos

Documentation

@clubmega/n8n-nodes-mega

npm version
npm downloads

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

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
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.

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)

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

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

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

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
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
Update Attachment Metadata Update metadata on attachments (e.g., transcription)
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

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

Inbox

Operation Description
Get Get information about a specific inbox
List List all inboxes in an account
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
Test Webhook Send a test event using configured Kanban webhook

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, 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.
  • 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

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

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.

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

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)

Trigger Events

The Mega Trigger node supports the following webhook events:

Event Description
Contact Created Triggered when a new contact is created
Contact Updated Triggered when a contact is updated
Conversation Created Triggered when a new conversation is created
Conversation Status Changed Triggered when conversation status changes
Conversation Updated Triggered when a conversation is updated
Conversation Typing On Triggered when someone starts typing
Conversation Typing Off Triggered when someone stops typing
Message Created Triggered when a message is created
Message Updated Triggered when a message is updated
Message Incoming ⚡ Triggered for incoming messages only
Message Outgoing ⚡ Triggered for outgoing messages only
Provider Event Received ⚡ Triggered when a provider event is received
Live Chat Widget Opened Triggered when a user opens the live chat widget

⚡ These events are only available with MEGA

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 2.x
  • 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

Discussion