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

@clubmega/n8n-nodes-mega

v0.8.1

Published

MEGA integration with n8n

Readme

@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

| Operation | Description | | --------- | ---------------------------------------------------- | | 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 |

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 |

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

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 |

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