Documentation menu

n8n

The MailInApp nodes for n8n start workflows when something happens in MailInApp, and let workflows add contacts, move deals, enroll contacts in journeys and send transactional email. They're published on npm as n8n-nodes-mailinapp.

Install

In n8n, go to Settings → Community Nodes → Install and enter n8n-nodes-mailinapp. See n8n's community nodes guide for details.

You can install it on self-hosted n8n now. n8n Cloud only offers community nodes that n8n has verified, and this package hasn't been verified yet. It's built to n8n's verification rules, so Cloud support follows once n8n approves it.

Connect your account

  1. In MailInApp, go to Developers and create an API key. It starts with mia_live_ and is shown once.
  2. In n8n, create a MailInApp API credential and paste the key. Leave Base URL as https://mailinapp.com.

The key acts as your whole MailInApp account, so treat it like a password. Revoking it in MailInApp also turns off every trigger it set up.

The MailInApp Trigger node

Pick one or more events. When you activate the workflow, the node subscribes to them in MailInApp. When you deactivate it, the subscription is removed. You can see these subscriptions under Developers → Webhooks, marked n8n.

The events are the twelve account events: Interaction Received, Form Submitted, Contact Created, Contact Updated, Lead Turned Hot, New Lead, Meeting Booked, Meeting Cancelled, Deal Created, Deal Stage Changed, Purchase Completed and Journey Completed.

Each run receives the event as MailInApp sent it, with id, type, createdAt and data. The id is the same on every delivery of one event, so you can use it to skip duplicates. Every delivery is signed. The node turns away any request without a valid signature or with a timestamp more than 5 minutes old, so knowing the webhook URL isn't enough to start your workflow.

The MailInApp node

ResourceOperations
ContactCreate or Update an address in a contacts list. MailInApp verifies it as it saves it. Get the address's contact in every list, or in one.
Contacts ListGet Many lists with their fields and contact counts.
DealCreate a deal for a contact, by email. Set an Idempotency Key (an order id, for example) so a retried run doesn't create a second deal. Update a deal: move it to another stage, won and lost included, or change its title, value or currency.
EmailSend Transactional email: your own subject and HTML or text, or a studio project with merge data. A send that fails is an error. A suppressed result (the address bounced or is invalid) is a normal result you can branch on.
JourneyEnroll Contact in a journey whose trigger is API call, and Get Many journeys.
PipelineGet Many pipelines with their stages.

Dropdowns fill in your lists, list fields, journeys, pipelines and stages for you. The node supports n8n's Continue On Fail.

Marketing email isn't offered: a workflow can't prove the recipient agreed to it. Send marketing from MailInApp, or enroll the contact in a journey.

Use it with an AI agent

The MailInApp node can be used as a tool by n8n's AI Agent. For a wider set of tools, also connect the agent to MailInApp's MCP server with an MCP Client Tool node: endpoint https://mailinapp.com/api/mcp, with your API key as a Bearer credential.

The package includes a ready-made example workflow (examples/ai-agent-mcp.workflow.json in the package). Its agent can read contacts, results, form responses, segments and journeys, and draft new journeys, but it has no tool that sends email. Journeys an agent builds are always saved turned off, so a person reviews them and turns them on.

Without the nodes

Any n8n workflow can also use MailInApp through the generic Webhook trigger, pointed at by a webhook you add under Developers → Webhooks, and the HTTP Request node calling the API.