@pixelandprocess/n8n-nodes-mailcoach
v1.0.3
Published
n8n node for Mailcoach API - Manage email lists, subscribers, campaigns, and transactional emails
Maintainers
Readme
n8n-nodes-mailcoach
This is an n8n community node that lets you use Mailcoach in your n8n workflows. Mailcoach is a powerful email marketing platform for managing email lists, campaigns, automations, and transactional emails.
n8n is a fair-code licensed workflow automation platform.
Created by Pixel & Process - Your partner for digital marketing, web development, and process automation in Lübeck, Germany. 🇩🇪
Table of Contents
Installation
Follow the installation guide in the n8n community nodes documentation.
Community Installation
npm install @pixelandprocess/n8n-nodes-mailcoachManual Installation (for development)
- Clone this repository
- Install dependencies:
npm install - Build the node:
npm run build - Link the node:
npm link - Navigate to your n8n installation and link the node:
npm link @pixelandprocess/n8n-nodes-mailcoach
Operations
This node supports the following resources and operations:
Email List
- Get Many: Retrieve all email lists
- Get: Get a specific email list by ID
- Create: Create a new email list
- Update: Update an existing email list
- Delete: Delete an email list
Campaign
- Get Many: Retrieve all campaigns
- Get: Get a specific campaign by ID
- Create: Create a new campaign
- Update: Update an existing campaign
- Delete: Delete a campaign
- Send: Send a campaign to subscribers
- Send Test: Send a test email for a campaign
- Get Opens: Get campaign open statistics
- Get Clicks: Get campaign click statistics
- Get Bounces: Get campaign bounce statistics
- Get Unsubscribes: Get campaign unsubscribe statistics
Subscriber
- Get Many: Retrieve all subscribers from an email list
- Get: Get a specific subscriber by ID
- Create: Add a new subscriber to an email list
- Update: Update an existing subscriber
- Delete: Remove a subscriber
- Confirm: Confirm a subscriber's email address
- Unsubscribe: Unsubscribe a subscriber
- Resubscribe: Resubscribe a previously unsubscribed subscriber
- Resend Confirmation: Resend the confirmation email to a subscriber
- Add Tags: Add tags to a subscriber
- Remove Tags: Remove tags from a subscriber
Tag
- Create: Create a new tag on an email list
- Update: Update an existing tag
- Delete: Delete a tag
Transactional Mail
- Get Many: Retrieve all transactional mails
- Get: Get a specific transactional mail by ID
- Get Templates: Retrieve all transactional mail templates
- Get Template: Get a specific template by ID
- Send: Send a transactional email
Automation
- Trigger: Trigger an automation for specific subscribers
Credentials
To use this node, you need to configure Mailcoach API credentials:
- In n8n, go to Credentials → New
- Search for "Mailcoach API"
- Enter the following information:
- API Endpoint: Your Mailcoach API endpoint (e.g.,
https://yourdomain.mailcoach.app/api) - API Token: Your Mailcoach API token
- API Endpoint: Your Mailcoach API endpoint (e.g.,
Getting Your API Credentials
- Log in to your Mailcoach account
- Go to Settings → API Tokens
- Create a new API token or use an existing one
- Copy the API token and endpoint URL
Compatibility
- Minimum n8n version: 0.180.0
- Tested against n8n version: 1.0.0+
- Mailcoach API: v1 (compatible with Mailcoach v6 and up, including Mailcoach Cloud)
Usage
Example: Create and Send a Campaign
- Add a Mailcoach node to your workflow
- Select Campaign as the resource
- Select Create as the operation
- Configure the campaign:
- Email List ID
- Campaign Name
- Subject
- HTML content or template
- Add another Mailcoach node
- Select Campaign as the resource
- Select Send as the operation
- Use the campaign ID from the previous step
Example: Add Subscriber with Tags
- Add a Mailcoach node to your workflow
- Select Subscriber as the resource
- Select Create as the operation
- Configure the subscriber:
- Email List ID
- Email address
- Additional fields (first name, last name, tags, etc.)
Example: Send Transactional Email
- Add a Mailcoach node to your workflow
- Select Transactional Mail as the resource
- Select Send as the operation
- Configure the email:
- Mail Name (template name)
- From email
- To email
- Replacements (template variables)
Resources
Development
Prerequisites
- Node.js (v18.10.0 or higher)
- npm
- Docker and Docker Compose (for testing)
Setup Development Environment
Clone the repository:
git clone https://github.com/Pixel-Process-UG/n8n-nodes-mailcoach.git cd n8n-nodes-mailcoachInstall dependencies:
npm installBuild the node:
npm run buildStart the development environment:
chmod +x scripts/dev.sh ./scripts/dev.shOr manually with Docker Compose:
docker-compose up -dAccess n8n at http://localhost:5678
- Username:
admin - Password:
admin123
- Username:
Watch Mode
To automatically rebuild on file changes:
npm run devTesting the Node
Build the node:
npm run buildStart the test environment:
chmod +x scripts/test.sh ./scripts/test.shIn n8n, add the Mailcoach node to a workflow and test the operations
Project Structure
n8n-mailcoach/
├── credentials/
│ └── MailcoachApi.credentials.ts # API credentials configuration
├── nodes/
│ └── Mailcoach/
│ ├── Mailcoach.node.ts # Main node implementation
│ └── mailcoach.svg # Node icon
├── scripts/
│ ├── dev.sh # Development helper script
│ └── test.sh # Testing helper script
├── docker-compose.yml # Docker setup for local testing
├── package.json # Package configuration
├── tsconfig.json # TypeScript configuration
└── README.md # This fileAvailable npm Scripts
npm run build: Build the nodenpm run dev: Watch for changes and rebuild automaticallynpm run format: Format code with Prettiernpm run lint: Lint code with ESLintnpm run lintfix: Auto-fix linting issues
Docker Environment
The project includes a Docker Compose setup for easy local testing:
- n8n: The workflow automation platform (port 5678)
- postgres: PostgreSQL database for n8n (optional, for production-like setup)
To start:
docker-compose up -dTo stop:
docker-compose downTo view logs:
docker-compose logs -f n8nAPI Coverage
This node implements all major Mailcoach API endpoints:
✅ Email Lists (CRUD operations)
✅ Subscribers (CRUD + confirm/unsubscribe/resubscribe)
✅ Campaigns (CRUD + send/test + analytics)
✅ Tags (CRUD operations)
✅ Transactional Mails (send + templates)
✅ Automations (trigger)
Based on the official Mailcoach PHP SDK.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for detailed guidelines.
Quick start:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Publishing
Automated Publishing
This project uses GitHub Actions to automatically publish to npm when a new release is created:
- Update version in
package.json - Update
CHANGELOG.mdwith changes - Commit and push changes
- Create a tag:
git tag -a v1.0.1 -m "Release v1.0.1" git push origin v1.0.1 - Create GitHub Release - Publishing to npm happens automatically
GitHub Actions Workflows
- Build & Test - Runs on every push/PR
- Version Check - Ensures version is bumped in PRs
- Publish to npm - Automatic when GitHub release is created
Issues
If you encounter any issues or have questions, please open an issue on GitHub.
License
Author
Pixel Process UG
- Email: [email protected]
- GitHub: @Pixel-Process-UG
Acknowledgments
- Built on top of n8n
- Integrates with Mailcoach by Spatie
- Based on the Mailcoach PHP SDK
- Created by Pixel & Process - Digital agency for marketing, web development, and automation
About Pixel & Process
Pixel & Process is a digital agency based in Lübeck, Germany, specializing in:
- 📈 Performance Marketing - Google Ads, Meta, LinkedIn
- 🎨 Web Design & Development - Next.js, React, modern web technologies
- ⚙️ Process Automation - n8n, workflow automation, efficiency optimization
- 🔓 Open Source Solutions - GDPR-compliant, sustainable digital transformation
We build tools like this n8n-mailcoach node to help businesses automate their marketing and improve efficiency.
🌐 Website: pixelandprocess.de
📧 Contact: [email protected]
📍 Location: Lübeck, Germany
Note: This is a community-created node and is not officially maintained by n8n GmbH or Spatie.
