n8n-nodes-mautic-advanced 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,335 +1,335 @@
|
|
|
1
|
-
# n8n Mautic Advanced Node
|
|
2
|
-
|
|
3
|
-
[](https://buymeacoffee.com/msoukhomlinov)
|
|
4
|
-
|
|
5
|
-
Enhanced n8n node for Mautic with comprehensive API coverage including tags, campaigns, categories, notifications, and advanced contact management.
|
|
6
|
-
|
|
7
|
-
## 📋 Table of Contents
|
|
8
|
-
|
|
9
|
-
- [What Makes This "Advanced"?](#what-makes-this-advanced)
|
|
10
|
-
- [Features](#features)
|
|
11
|
-
- [Supported Resources and Operations](#supported-resources-and-operations)
|
|
12
|
-
- [Installation](#installation)
|
|
13
|
-
- [Authentication](#authentication)
|
|
14
|
-
- [Advanced Features](#advanced-features)
|
|
15
|
-
- [Usage Examples](#usage-examples)
|
|
16
|
-
- [Development](#development)
|
|
17
|
-
- [Troubleshooting](#troubleshooting)
|
|
18
|
-
- [Changelog](#changelog)
|
|
19
|
-
- [Support](#support)
|
|
20
|
-
- [License](#license)
|
|
21
|
-
|
|
22
|
-
## What Makes This "Advanced"?
|
|
23
|
-
|
|
24
|
-
This enhanced version extends the standard n8n Mautic node with:
|
|
25
|
-
|
|
26
|
-
- **🏷️ Complete Tag Management**: Full CRUD operations for tags (missing in the standard node)
|
|
27
|
-
- **📊 Campaign Operations**: Create, clone, update, and manage campaigns
|
|
28
|
-
- **📁 Category Management**: Handle categories with bundle and color support
|
|
29
|
-
- **🔔 Notification Management**: Full CRUD operations for notifications with scheduling and language support
|
|
30
|
-
- **🔗 Advanced Relationship Management**: Sophisticated contact-to-campaign and contact-to-company associations
|
|
31
|
-
- **📧 Enhanced Email Operations**: Segment-based email sending capabilities
|
|
32
|
-
- **👥 Extended Contact Operations**: UTM tag management, activity tracking, device information, and notes
|
|
33
|
-
- **🏢 Complete Company Management**: Full company lifecycle with custom fields and address support
|
|
34
|
-
- **🔍 Advanced Filtering**: Where filters, DNC filtering, and field selection
|
|
35
|
-
- **📅 Smart Date Handling**: Automatic date formatting for Mautic API compatibility
|
|
36
|
-
|
|
37
|
-
## Features
|
|
38
|
-
|
|
39
|
-
### 🚀 Core Features
|
|
40
|
-
- **Comprehensive API Coverage**: All major Mautic API endpoints supported
|
|
41
|
-
- **Advanced Filtering**: Where filters with nested conditions (andX/orX)
|
|
42
|
-
- **DNC Management**: Filter contacts by Do Not Contact status
|
|
43
|
-
- **Field Selection**: Choose which fields to return for Contact operations
|
|
44
|
-
- **Pagination Support**: Automatic handling of large datasets
|
|
45
|
-
- **Custom Fields**: Full support for custom field management
|
|
46
|
-
- **Error Handling**: Robust error handling and validation
|
|
47
|
-
|
|
48
|
-
### 🔐 Authentication
|
|
49
|
-
- **API Credentials**: Simple API key authentication
|
|
50
|
-
- **OAuth2**: Full OAuth2 flow support for secure authentication
|
|
51
|
-
|
|
52
|
-
### 📊 Data Management
|
|
53
|
-
- **RAW Data Options**: Control data output format
|
|
54
|
-
- **System Fields**: Built-in support for system fields
|
|
55
|
-
- **Date Formatting**: Automatic UTC date formatting
|
|
56
|
-
- **Deduplication**: Prevents duplicate records in paginated results
|
|
57
|
-
|
|
58
|
-
## Supported Resources and Operations
|
|
59
|
-
|
|
60
|
-
### 🏢 Companies
|
|
61
|
-
- **Create** a new company with full address and custom field support
|
|
62
|
-
- **Get** a company by ID
|
|
63
|
-
- **Get Many** companies with filtering and pagination
|
|
64
|
-
- **Update** company details
|
|
65
|
-
- **Delete** a company
|
|
66
|
-
|
|
67
|
-
### 👥 Contacts (Enhanced)
|
|
68
|
-
- **Create** a new contact with extensive field options
|
|
69
|
-
- **Get** a contact by ID with field selection
|
|
70
|
-
- **Get Many** contacts with advanced filtering and DNC options
|
|
71
|
-
- **Update** contact details
|
|
72
|
-
- **Delete** a contact
|
|
73
|
-
- **Delete Batch** multiple contacts in one operation
|
|
74
|
-
- **Send Email** to a contact
|
|
75
|
-
- **Edit Contact Points** (add/subtract points)
|
|
76
|
-
- **Edit Do Not Contact List** (add/remove from DNC)
|
|
77
|
-
- **Add/Remove UTM Tags** for tracking
|
|
78
|
-
- **Get Notes** associated with a contact
|
|
79
|
-
- **Get Activity** history for a contact
|
|
80
|
-
- **Get Companies** associated with a contact
|
|
81
|
-
- **Get Devices** used by a contact
|
|
82
|
-
|
|
83
|
-
### 🏷️ Tags
|
|
84
|
-
- **Create** a new tag with description
|
|
85
|
-
- **Get** a tag by ID
|
|
86
|
-
- **Get Many** tags with search capabilities
|
|
87
|
-
- **Update** tag name and description
|
|
88
|
-
- **Delete** a tag
|
|
89
|
-
|
|
90
|
-
### 📊 Campaigns
|
|
91
|
-
- **Create** a new campaign
|
|
92
|
-
- **Get** a campaign by ID
|
|
93
|
-
- **Get All** campaigns
|
|
94
|
-
- **Update** campaign details
|
|
95
|
-
- **Delete** a campaign
|
|
96
|
-
- **Clone** an existing campaign
|
|
97
|
-
- **Get Contacts** in a campaign
|
|
98
|
-
|
|
99
|
-
### 📁 Categories
|
|
100
|
-
- **Create** a new category with bundle and color settings
|
|
101
|
-
- **Get** a category by ID
|
|
102
|
-
- **Get Many** categories
|
|
103
|
-
- **Update** category details
|
|
104
|
-
- **Delete** a category
|
|
105
|
-
|
|
106
|
-
### 🔔 Notifications
|
|
107
|
-
- **Create** a new notification with scheduling and language support
|
|
108
|
-
- **Get** a notification by ID
|
|
109
|
-
- **Get Many** notifications with filtering
|
|
110
|
-
- **Update** notification details
|
|
111
|
-
- **Delete** a notification
|
|
112
|
-
|
|
113
|
-
### 📋 Segments
|
|
114
|
-
- **Create** a new segment
|
|
115
|
-
- **Get** a segment by ID
|
|
116
|
-
- **Get Many** segments with filtering
|
|
117
|
-
- **Update** segment details
|
|
118
|
-
- **Delete** a segment
|
|
119
|
-
|
|
120
|
-
### 🔗 Relationship Management
|
|
121
|
-
- **Campaign Contact**: Add/remove contacts to/from campaigns
|
|
122
|
-
- **Company Contact**: Add/remove contacts to/from companies
|
|
123
|
-
- **Contact Segment**: Add/remove contacts to/from segments
|
|
124
|
-
|
|
125
|
-
### 📧 Email Operations
|
|
126
|
-
- **Segment Email**: Send emails to segments
|
|
127
|
-
|
|
128
|
-
## Installation
|
|
129
|
-
|
|
130
|
-
### Method 1: npm (Recommended)
|
|
131
|
-
```bash
|
|
132
|
-
npm install n8n-nodes-mautic-advanced
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Method 2: Manual Installation
|
|
136
|
-
1. Clone this repository:
|
|
137
|
-
```bash
|
|
138
|
-
git clone https://github.com/msoukhomlinov/n8n-nodes-mautic-advanced.git
|
|
139
|
-
cd n8n-nodes-mautic-advanced
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
2. Install dependencies:
|
|
143
|
-
```bash
|
|
144
|
-
npm install
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
3. Build the node:
|
|
148
|
-
```bash
|
|
149
|
-
npm run build
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
4. Link to your n8n installation:
|
|
153
|
-
```bash
|
|
154
|
-
npm link
|
|
155
|
-
cd /path/to/your/n8n/installation
|
|
156
|
-
npm link n8n-nodes-mautic-advanced
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Authentication
|
|
160
|
-
|
|
161
|
-
### API Credentials
|
|
162
|
-
1. Go to your Mautic instance
|
|
163
|
-
2. Navigate to **Settings** → **API Credentials**
|
|
164
|
-
3. Create a new API credential
|
|
165
|
-
4. Copy the **Public Key** and **Secret Key**
|
|
166
|
-
5. In n8n, add a new Mautic Advanced credential
|
|
167
|
-
6. Select **Credentials** authentication method
|
|
168
|
-
7. Enter your Mautic URL, Public Key, and Secret Key
|
|
169
|
-
|
|
170
|
-
### OAuth2
|
|
171
|
-
1. In n8n, add a new Mautic Advanced credential
|
|
172
|
-
2. Select **OAuth2** authentication method
|
|
173
|
-
3. Enter your Mautic URL
|
|
174
|
-
4. Follow the OAuth2 authorization flow
|
|
175
|
-
|
|
176
|
-
## Advanced Features
|
|
177
|
-
|
|
178
|
-
### Where Filters
|
|
179
|
-
Advanced filtering for Contact > Get Many operations:
|
|
180
|
-
- **Nested Conditions**: Support for andX/orX logical operators
|
|
181
|
-
- **Multiple Expressions**: eq, neq, lt, lte, gt, gte, between, in, isNull, isNotNull
|
|
182
|
-
- **Custom Fields**: Filter by any custom or system field
|
|
183
|
-
- **Date Filtering**: Automatic date formatting for Mautic API
|
|
184
|
-
|
|
185
|
-
### DNC Filtering
|
|
186
|
-
Filter contacts by Do Not Contact status:
|
|
187
|
-
- **Email DNC Only**: Contacts with email DNC enabled
|
|
188
|
-
- **SMS DNC Only**: Contacts with SMS DNC enabled
|
|
189
|
-
- **Any DNC Only**: Contacts with any DNC enabled
|
|
190
|
-
|
|
191
|
-
### Field Selection
|
|
192
|
-
Choose which fields to return for Contact operations:
|
|
193
|
-
- **System Fields**: date_added, date_modified, id, owner_id
|
|
194
|
-
- **Custom Fields**: Any custom field defined in Mautic
|
|
195
|
-
- **All Fields**: Return complete contact data
|
|
196
|
-
|
|
197
|
-
### Date Formatting
|
|
198
|
-
Automatic date formatting for known date fields:
|
|
199
|
-
- **Format**: YYYY-MM-DD HH:mm:ss UTC
|
|
200
|
-
- **Compatibility**: Ensures Mautic API compatibility
|
|
201
|
-
- **Fields**: date_added, date_modified, lastActive, etc.
|
|
202
|
-
|
|
203
|
-
## Usage Examples
|
|
204
|
-
|
|
205
|
-
### Create a Contact with Tags
|
|
206
|
-
```javascript
|
|
207
|
-
// Contact Create operation
|
|
208
|
-
{
|
|
209
|
-
"email": "john.doe@example.com",
|
|
210
|
-
"firstName": "John",
|
|
211
|
-
"lastName": "Doe",
|
|
212
|
-
"additionalFields": {
|
|
213
|
-
"tags": ["customer", "vip"],
|
|
214
|
-
"company": "Example Corp",
|
|
215
|
-
"phone": "+1234567890"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### Filter Contacts with Where Conditions
|
|
221
|
-
```javascript
|
|
222
|
-
// Contact Get Many with Where filter
|
|
223
|
-
{
|
|
224
|
-
"where": {
|
|
225
|
-
"conditions": [
|
|
226
|
-
{
|
|
227
|
-
"col": "email",
|
|
228
|
-
"expr": "neq",
|
|
229
|
-
"val": ""
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"col": "date_added",
|
|
233
|
-
"expr": "gte",
|
|
234
|
-
"val": "2024-01-01"
|
|
235
|
-
}
|
|
236
|
-
]
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### Send Email to Segment
|
|
242
|
-
```javascript
|
|
243
|
-
// Segment Email operation
|
|
244
|
-
{
|
|
245
|
-
"segmentId": "123",
|
|
246
|
-
"emailId": "456",
|
|
247
|
-
"options": {
|
|
248
|
-
"sendToNewOnly": true
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
## Development
|
|
254
|
-
|
|
255
|
-
### Prerequisites
|
|
256
|
-
- Node.js 16+
|
|
257
|
-
- npm or yarn
|
|
258
|
-
- n8n development environment
|
|
259
|
-
|
|
260
|
-
### Commands
|
|
261
|
-
```bash
|
|
262
|
-
# Install dependencies
|
|
263
|
-
npm install
|
|
264
|
-
|
|
265
|
-
# Build the node
|
|
266
|
-
npm run build
|
|
267
|
-
|
|
268
|
-
# Watch for changes (development)
|
|
269
|
-
npm run dev
|
|
270
|
-
|
|
271
|
-
# Check for linting errors
|
|
272
|
-
npm run lint
|
|
273
|
-
|
|
274
|
-
# Fix linting errors
|
|
275
|
-
npm run lint:fix
|
|
276
|
-
|
|
277
|
-
# Format code
|
|
278
|
-
npm run format
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### Project Structure
|
|
282
|
-
```
|
|
283
|
-
├── credentials/ # Authentication credentials
|
|
284
|
-
├── nodes/ # Node implementations
|
|
285
|
-
│ └── MauticAdvanced/ # Main node files
|
|
286
|
-
├── dist/ # Compiled output
|
|
287
|
-
├── package.json # Project configuration
|
|
288
|
-
└── README.md # This file
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
## Troubleshooting
|
|
292
|
-
|
|
293
|
-
### Common Issues
|
|
294
|
-
|
|
295
|
-
#### "Could not get parameter 'options'" Error
|
|
296
|
-
**Cause**: Missing Options parameter in node definition
|
|
297
|
-
**Solution**: Update to latest version (0.3.2+) which includes all required Options parameters
|
|
298
|
-
|
|
299
|
-
#### Authentication Errors
|
|
300
|
-
**Cause**: Incorrect credentials or URL
|
|
301
|
-
**Solution**:
|
|
302
|
-
- Verify Mautic URL format (https://your-mautic.com)
|
|
303
|
-
- Check API credentials are active
|
|
304
|
-
- Ensure proper permissions for API access
|
|
305
|
-
|
|
306
|
-
#### Date Filter Issues
|
|
307
|
-
**Cause**: Incorrect date format
|
|
308
|
-
**Solution**: Use YYYY-MM-DD format for date filters
|
|
309
|
-
|
|
310
|
-
#### Pagination Problems
|
|
311
|
-
**Cause**: Large datasets causing timeouts
|
|
312
|
-
**Solution**: Use "Return All" option or set appropriate limits
|
|
313
|
-
|
|
314
|
-
### Getting Help
|
|
315
|
-
1. Check the [Changelog](CHANGELOG.md) for recent fixes
|
|
316
|
-
2. Search existing [Issues](https://github.com/msoukhomlinov/n8n-nodes-mautic-advanced/issues)
|
|
317
|
-
3. Create a new issue with detailed information
|
|
318
|
-
|
|
319
|
-
## Support
|
|
320
|
-
|
|
321
|
-
If you find this node helpful and want to support its ongoing development, you can buy me a coffee:
|
|
322
|
-
|
|
323
|
-
[](https://buymeacoffee.com/msoukhomlinov)
|
|
324
|
-
|
|
325
|
-
Your support helps maintain this project and develop new features.
|
|
326
|
-
|
|
327
|
-
## License
|
|
328
|
-
|
|
329
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
330
|
-
|
|
331
|
-
## Credits
|
|
332
|
-
|
|
333
|
-
- Built with [n8n](https://n8n.io/) workflow automation platform
|
|
334
|
-
- Uses [change-case](https://github.com/blakeembrey/change-case) for string manipulation
|
|
335
|
-
- Icons and design inspired by n8n community standards
|
|
1
|
+
# n8n Mautic Advanced Node
|
|
2
|
+
|
|
3
|
+
[](https://buymeacoffee.com/msoukhomlinov)
|
|
4
|
+
|
|
5
|
+
Enhanced n8n node for Mautic with comprehensive API coverage including tags, campaigns, categories, notifications, and advanced contact management.
|
|
6
|
+
|
|
7
|
+
## 📋 Table of Contents
|
|
8
|
+
|
|
9
|
+
- [What Makes This "Advanced"?](#what-makes-this-advanced)
|
|
10
|
+
- [Features](#features)
|
|
11
|
+
- [Supported Resources and Operations](#supported-resources-and-operations)
|
|
12
|
+
- [Installation](#installation)
|
|
13
|
+
- [Authentication](#authentication)
|
|
14
|
+
- [Advanced Features](#advanced-features)
|
|
15
|
+
- [Usage Examples](#usage-examples)
|
|
16
|
+
- [Development](#development)
|
|
17
|
+
- [Troubleshooting](#troubleshooting)
|
|
18
|
+
- [Changelog](#changelog)
|
|
19
|
+
- [Support](#support)
|
|
20
|
+
- [License](#license)
|
|
21
|
+
|
|
22
|
+
## What Makes This "Advanced"?
|
|
23
|
+
|
|
24
|
+
This enhanced version extends the standard n8n Mautic node with:
|
|
25
|
+
|
|
26
|
+
- **🏷️ Complete Tag Management**: Full CRUD operations for tags (missing in the standard node)
|
|
27
|
+
- **📊 Campaign Operations**: Create, clone, update, and manage campaigns
|
|
28
|
+
- **📁 Category Management**: Handle categories with bundle and color support
|
|
29
|
+
- **🔔 Notification Management**: Full CRUD operations for notifications with scheduling and language support
|
|
30
|
+
- **🔗 Advanced Relationship Management**: Sophisticated contact-to-campaign and contact-to-company associations
|
|
31
|
+
- **📧 Enhanced Email Operations**: Segment-based email sending capabilities
|
|
32
|
+
- **👥 Extended Contact Operations**: UTM tag management, activity tracking, device information, and notes
|
|
33
|
+
- **🏢 Complete Company Management**: Full company lifecycle with custom fields and address support
|
|
34
|
+
- **🔍 Advanced Filtering**: Where filters, DNC filtering, and field selection
|
|
35
|
+
- **📅 Smart Date Handling**: Automatic date formatting for Mautic API compatibility
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
### 🚀 Core Features
|
|
40
|
+
- **Comprehensive API Coverage**: All major Mautic API endpoints supported
|
|
41
|
+
- **Advanced Filtering**: Where filters with nested conditions (andX/orX)
|
|
42
|
+
- **DNC Management**: Filter contacts by Do Not Contact status
|
|
43
|
+
- **Field Selection**: Choose which fields to return for Contact operations
|
|
44
|
+
- **Pagination Support**: Automatic handling of large datasets
|
|
45
|
+
- **Custom Fields**: Full support for custom field management
|
|
46
|
+
- **Error Handling**: Robust error handling and validation
|
|
47
|
+
|
|
48
|
+
### 🔐 Authentication
|
|
49
|
+
- **API Credentials**: Simple API key authentication
|
|
50
|
+
- **OAuth2**: Full OAuth2 flow support for secure authentication
|
|
51
|
+
|
|
52
|
+
### 📊 Data Management
|
|
53
|
+
- **RAW Data Options**: Control data output format
|
|
54
|
+
- **System Fields**: Built-in support for system fields
|
|
55
|
+
- **Date Formatting**: Automatic UTC date formatting
|
|
56
|
+
- **Deduplication**: Prevents duplicate records in paginated results
|
|
57
|
+
|
|
58
|
+
## Supported Resources and Operations
|
|
59
|
+
|
|
60
|
+
### 🏢 Companies
|
|
61
|
+
- **Create** a new company with full address and custom field support
|
|
62
|
+
- **Get** a company by ID
|
|
63
|
+
- **Get Many** companies with filtering and pagination
|
|
64
|
+
- **Update** company details
|
|
65
|
+
- **Delete** a company
|
|
66
|
+
|
|
67
|
+
### 👥 Contacts (Enhanced)
|
|
68
|
+
- **Create** a new contact with extensive field options
|
|
69
|
+
- **Get** a contact by ID with field selection
|
|
70
|
+
- **Get Many** contacts with advanced filtering and DNC options
|
|
71
|
+
- **Update** contact details
|
|
72
|
+
- **Delete** a contact
|
|
73
|
+
- **Delete Batch** multiple contacts in one operation
|
|
74
|
+
- **Send Email** to a contact
|
|
75
|
+
- **Edit Contact Points** (add/subtract points)
|
|
76
|
+
- **Edit Do Not Contact List** (add/remove from DNC)
|
|
77
|
+
- **Add/Remove UTM Tags** for tracking
|
|
78
|
+
- **Get Notes** associated with a contact
|
|
79
|
+
- **Get Activity** history for a contact
|
|
80
|
+
- **Get Companies** associated with a contact
|
|
81
|
+
- **Get Devices** used by a contact
|
|
82
|
+
|
|
83
|
+
### 🏷️ Tags
|
|
84
|
+
- **Create** a new tag with description
|
|
85
|
+
- **Get** a tag by ID
|
|
86
|
+
- **Get Many** tags with search capabilities
|
|
87
|
+
- **Update** tag name and description
|
|
88
|
+
- **Delete** a tag
|
|
89
|
+
|
|
90
|
+
### 📊 Campaigns
|
|
91
|
+
- **Create** a new campaign
|
|
92
|
+
- **Get** a campaign by ID
|
|
93
|
+
- **Get All** campaigns
|
|
94
|
+
- **Update** campaign details
|
|
95
|
+
- **Delete** a campaign
|
|
96
|
+
- **Clone** an existing campaign
|
|
97
|
+
- **Get Contacts** in a campaign
|
|
98
|
+
|
|
99
|
+
### 📁 Categories
|
|
100
|
+
- **Create** a new category with bundle and color settings
|
|
101
|
+
- **Get** a category by ID
|
|
102
|
+
- **Get Many** categories
|
|
103
|
+
- **Update** category details
|
|
104
|
+
- **Delete** a category
|
|
105
|
+
|
|
106
|
+
### 🔔 Notifications
|
|
107
|
+
- **Create** a new notification with scheduling and language support
|
|
108
|
+
- **Get** a notification by ID
|
|
109
|
+
- **Get Many** notifications with filtering
|
|
110
|
+
- **Update** notification details
|
|
111
|
+
- **Delete** a notification
|
|
112
|
+
|
|
113
|
+
### 📋 Segments
|
|
114
|
+
- **Create** a new segment
|
|
115
|
+
- **Get** a segment by ID
|
|
116
|
+
- **Get Many** segments with filtering
|
|
117
|
+
- **Update** segment details
|
|
118
|
+
- **Delete** a segment
|
|
119
|
+
|
|
120
|
+
### 🔗 Relationship Management
|
|
121
|
+
- **Campaign Contact**: Add/remove contacts to/from campaigns
|
|
122
|
+
- **Company Contact**: Add/remove contacts to/from companies
|
|
123
|
+
- **Contact Segment**: Add/remove contacts to/from segments
|
|
124
|
+
|
|
125
|
+
### 📧 Email Operations
|
|
126
|
+
- **Segment Email**: Send emails to segments
|
|
127
|
+
|
|
128
|
+
## Installation
|
|
129
|
+
|
|
130
|
+
### Method 1: npm (Recommended)
|
|
131
|
+
```bash
|
|
132
|
+
npm install n8n-nodes-mautic-advanced
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Method 2: Manual Installation
|
|
136
|
+
1. Clone this repository:
|
|
137
|
+
```bash
|
|
138
|
+
git clone https://github.com/msoukhomlinov/n8n-nodes-mautic-advanced.git
|
|
139
|
+
cd n8n-nodes-mautic-advanced
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
2. Install dependencies:
|
|
143
|
+
```bash
|
|
144
|
+
npm install
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
3. Build the node:
|
|
148
|
+
```bash
|
|
149
|
+
npm run build
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
4. Link to your n8n installation:
|
|
153
|
+
```bash
|
|
154
|
+
npm link
|
|
155
|
+
cd /path/to/your/n8n/installation
|
|
156
|
+
npm link n8n-nodes-mautic-advanced
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Authentication
|
|
160
|
+
|
|
161
|
+
### API Credentials
|
|
162
|
+
1. Go to your Mautic instance
|
|
163
|
+
2. Navigate to **Settings** → **API Credentials**
|
|
164
|
+
3. Create a new API credential
|
|
165
|
+
4. Copy the **Public Key** and **Secret Key**
|
|
166
|
+
5. In n8n, add a new Mautic Advanced credential
|
|
167
|
+
6. Select **Credentials** authentication method
|
|
168
|
+
7. Enter your Mautic URL, Public Key, and Secret Key
|
|
169
|
+
|
|
170
|
+
### OAuth2
|
|
171
|
+
1. In n8n, add a new Mautic Advanced credential
|
|
172
|
+
2. Select **OAuth2** authentication method
|
|
173
|
+
3. Enter your Mautic URL
|
|
174
|
+
4. Follow the OAuth2 authorization flow
|
|
175
|
+
|
|
176
|
+
## Advanced Features
|
|
177
|
+
|
|
178
|
+
### Where Filters
|
|
179
|
+
Advanced filtering for Contact > Get Many operations:
|
|
180
|
+
- **Nested Conditions**: Support for andX/orX logical operators
|
|
181
|
+
- **Multiple Expressions**: eq, neq, lt, lte, gt, gte, between, in, isNull, isNotNull
|
|
182
|
+
- **Custom Fields**: Filter by any custom or system field
|
|
183
|
+
- **Date Filtering**: Automatic date formatting for Mautic API
|
|
184
|
+
|
|
185
|
+
### DNC Filtering
|
|
186
|
+
Filter contacts by Do Not Contact status:
|
|
187
|
+
- **Email DNC Only**: Contacts with email DNC enabled
|
|
188
|
+
- **SMS DNC Only**: Contacts with SMS DNC enabled
|
|
189
|
+
- **Any DNC Only**: Contacts with any DNC enabled
|
|
190
|
+
|
|
191
|
+
### Field Selection
|
|
192
|
+
Choose which fields to return for Contact operations:
|
|
193
|
+
- **System Fields**: date_added, date_modified, id, owner_id
|
|
194
|
+
- **Custom Fields**: Any custom field defined in Mautic
|
|
195
|
+
- **All Fields**: Return complete contact data
|
|
196
|
+
|
|
197
|
+
### Date Formatting
|
|
198
|
+
Automatic date formatting for known date fields:
|
|
199
|
+
- **Format**: YYYY-MM-DD HH:mm:ss UTC
|
|
200
|
+
- **Compatibility**: Ensures Mautic API compatibility
|
|
201
|
+
- **Fields**: date_added, date_modified, lastActive, etc.
|
|
202
|
+
|
|
203
|
+
## Usage Examples
|
|
204
|
+
|
|
205
|
+
### Create a Contact with Tags
|
|
206
|
+
```javascript
|
|
207
|
+
// Contact Create operation
|
|
208
|
+
{
|
|
209
|
+
"email": "john.doe@example.com",
|
|
210
|
+
"firstName": "John",
|
|
211
|
+
"lastName": "Doe",
|
|
212
|
+
"additionalFields": {
|
|
213
|
+
"tags": ["customer", "vip"],
|
|
214
|
+
"company": "Example Corp",
|
|
215
|
+
"phone": "+1234567890"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Filter Contacts with Where Conditions
|
|
221
|
+
```javascript
|
|
222
|
+
// Contact Get Many with Where filter
|
|
223
|
+
{
|
|
224
|
+
"where": {
|
|
225
|
+
"conditions": [
|
|
226
|
+
{
|
|
227
|
+
"col": "email",
|
|
228
|
+
"expr": "neq",
|
|
229
|
+
"val": ""
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"col": "date_added",
|
|
233
|
+
"expr": "gte",
|
|
234
|
+
"val": "2024-01-01"
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Send Email to Segment
|
|
242
|
+
```javascript
|
|
243
|
+
// Segment Email operation
|
|
244
|
+
{
|
|
245
|
+
"segmentId": "123",
|
|
246
|
+
"emailId": "456",
|
|
247
|
+
"options": {
|
|
248
|
+
"sendToNewOnly": true
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Development
|
|
254
|
+
|
|
255
|
+
### Prerequisites
|
|
256
|
+
- Node.js 16+
|
|
257
|
+
- npm or yarn
|
|
258
|
+
- n8n development environment
|
|
259
|
+
|
|
260
|
+
### Commands
|
|
261
|
+
```bash
|
|
262
|
+
# Install dependencies
|
|
263
|
+
npm install
|
|
264
|
+
|
|
265
|
+
# Build the node
|
|
266
|
+
npm run build
|
|
267
|
+
|
|
268
|
+
# Watch for changes (development)
|
|
269
|
+
npm run dev
|
|
270
|
+
|
|
271
|
+
# Check for linting errors
|
|
272
|
+
npm run lint
|
|
273
|
+
|
|
274
|
+
# Fix linting errors
|
|
275
|
+
npm run lint:fix
|
|
276
|
+
|
|
277
|
+
# Format code
|
|
278
|
+
npm run format
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Project Structure
|
|
282
|
+
```
|
|
283
|
+
├── credentials/ # Authentication credentials
|
|
284
|
+
├── nodes/ # Node implementations
|
|
285
|
+
│ └── MauticAdvanced/ # Main node files
|
|
286
|
+
├── dist/ # Compiled output
|
|
287
|
+
├── package.json # Project configuration
|
|
288
|
+
└── README.md # This file
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Troubleshooting
|
|
292
|
+
|
|
293
|
+
### Common Issues
|
|
294
|
+
|
|
295
|
+
#### "Could not get parameter 'options'" Error
|
|
296
|
+
**Cause**: Missing Options parameter in node definition
|
|
297
|
+
**Solution**: Update to latest version (0.3.2+) which includes all required Options parameters
|
|
298
|
+
|
|
299
|
+
#### Authentication Errors
|
|
300
|
+
**Cause**: Incorrect credentials or URL
|
|
301
|
+
**Solution**:
|
|
302
|
+
- Verify Mautic URL format (https://your-mautic.com)
|
|
303
|
+
- Check API credentials are active
|
|
304
|
+
- Ensure proper permissions for API access
|
|
305
|
+
|
|
306
|
+
#### Date Filter Issues
|
|
307
|
+
**Cause**: Incorrect date format
|
|
308
|
+
**Solution**: Use YYYY-MM-DD format for date filters
|
|
309
|
+
|
|
310
|
+
#### Pagination Problems
|
|
311
|
+
**Cause**: Large datasets causing timeouts
|
|
312
|
+
**Solution**: Use "Return All" option or set appropriate limits
|
|
313
|
+
|
|
314
|
+
### Getting Help
|
|
315
|
+
1. Check the [Changelog](CHANGELOG.md) for recent fixes
|
|
316
|
+
2. Search existing [Issues](https://github.com/msoukhomlinov/n8n-nodes-mautic-advanced/issues)
|
|
317
|
+
3. Create a new issue with detailed information
|
|
318
|
+
|
|
319
|
+
## Support
|
|
320
|
+
|
|
321
|
+
If you find this node helpful and want to support its ongoing development, you can buy me a coffee:
|
|
322
|
+
|
|
323
|
+
[](https://buymeacoffee.com/msoukhomlinov)
|
|
324
|
+
|
|
325
|
+
Your support helps maintain this project and develop new features.
|
|
326
|
+
|
|
327
|
+
## License
|
|
328
|
+
|
|
329
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
330
|
+
|
|
331
|
+
## Credits
|
|
332
|
+
|
|
333
|
+
- Built with [n8n](https://n8n.io/) workflow automation platform
|
|
334
|
+
- Uses [change-case](https://github.com/blakeembrey/change-case) for string manipulation
|
|
335
|
+
- Icons and design inspired by n8n community standards
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="349.779" height="349.779">
|
|
2
|
-
<path
|
|
3
|
-
fill="#FFF"
|
|
4
|
-
d="M174.89 349.779C78.612 349.779 0 271.462 0 174.89S78.612 0 174.89 0c23.26 0 45.931 4.417 67.129 13.543 5.889 2.65 8.833 9.422 6.478 15.605-2.649 5.888-9.421 8.833-15.604 6.477-18.549-7.655-37.98-11.482-58.002-11.482-83.323 0-151.041 67.718-151.041 151.041s67.717 151.041 151.04 151.041 151.041-67.718 151.041-151.041c0-17.96-2.944-35.332-9.127-51.819-2.355-6.183.883-12.955 7.066-15.31s12.954.883 15.31 7.066c7.066 19.138 10.6 39.453 10.6 60.063-.001 95.983-78.318 174.595-174.89 174.595"
|
|
5
|
-
/>
|
|
6
|
-
<path
|
|
7
|
-
fill="#FDB933"
|
|
8
|
-
d="m251.44 156.93-27.086 28.264 15.015 63.302h34.153zm-11.187-83.618 9.421 9.422-74.784 79.201-63.891-65.658-36.803 152.219h34.154l20.315-84.5 46.225 50.347 98.927-107.76 9.422 9.716 9.421-53.292z"
|
|
9
|
-
/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="349.779" height="349.779">
|
|
2
|
+
<path
|
|
3
|
+
fill="#FFF"
|
|
4
|
+
d="M174.89 349.779C78.612 349.779 0 271.462 0 174.89S78.612 0 174.89 0c23.26 0 45.931 4.417 67.129 13.543 5.889 2.65 8.833 9.422 6.478 15.605-2.649 5.888-9.421 8.833-15.604 6.477-18.549-7.655-37.98-11.482-58.002-11.482-83.323 0-151.041 67.718-151.041 151.041s67.717 151.041 151.04 151.041 151.041-67.718 151.041-151.041c0-17.96-2.944-35.332-9.127-51.819-2.355-6.183.883-12.955 7.066-15.31s12.954.883 15.31 7.066c7.066 19.138 10.6 39.453 10.6 60.063-.001 95.983-78.318 174.595-174.89 174.595"
|
|
5
|
+
/>
|
|
6
|
+
<path
|
|
7
|
+
fill="#FDB933"
|
|
8
|
+
d="m251.44 156.93-27.086 28.264 15.015 63.302h34.153zm-11.187-83.618 9.421 9.422-74.784 79.201-63.891-65.658-36.803 152.219h34.154l20.315-84.5 46.225 50.347 98.927-107.76 9.422 9.716 9.421-53.292z"
|
|
9
|
+
/>
|
|
10
10
|
</svg>
|
|
@@ -162,7 +162,26 @@ exports.segmentFields = [
|
|
|
162
162
|
{
|
|
163
163
|
displayName: 'Type',
|
|
164
164
|
name: 'type',
|
|
165
|
-
type: '
|
|
165
|
+
type: 'options',
|
|
166
|
+
options: [
|
|
167
|
+
{ name: 'Boolean', value: 'boolean' },
|
|
168
|
+
{ name: 'Date', value: 'date' },
|
|
169
|
+
{ name: 'DateTime', value: 'datetime' },
|
|
170
|
+
{ name: 'Email', value: 'email' },
|
|
171
|
+
{ name: 'Country', value: 'country' },
|
|
172
|
+
{ name: 'Locale', value: 'locale' },
|
|
173
|
+
{ name: 'Lookup', value: 'lookup' },
|
|
174
|
+
{ name: 'Number', value: 'number' },
|
|
175
|
+
{ name: 'Tel', value: 'tel' },
|
|
176
|
+
{ name: 'Region', value: 'region' },
|
|
177
|
+
{ name: 'Select', value: 'select' },
|
|
178
|
+
{ name: 'Multiselect', value: 'multiselect' },
|
|
179
|
+
{ name: 'Text', value: 'text' },
|
|
180
|
+
{ name: 'Textarea', value: 'textarea' },
|
|
181
|
+
{ name: 'Time', value: 'time' },
|
|
182
|
+
{ name: 'Timezone', value: 'timezone' },
|
|
183
|
+
{ name: 'URL', value: 'url' },
|
|
184
|
+
],
|
|
166
185
|
default: 'email',
|
|
167
186
|
},
|
|
168
187
|
{
|
|
@@ -178,6 +197,10 @@ exports.segmentFields = [
|
|
|
178
197
|
options: [
|
|
179
198
|
{ name: '=', value: '=' },
|
|
180
199
|
{ name: '!=', value: '!=' },
|
|
200
|
+
{ name: '>', value: 'gt' },
|
|
201
|
+
{ name: '>=', value: 'gte' },
|
|
202
|
+
{ name: '<', value: 'lt' },
|
|
203
|
+
{ name: '<=', value: 'lte' },
|
|
181
204
|
{ name: 'Empty', value: 'empty' },
|
|
182
205
|
{ name: 'Not Empty', value: '!empty' },
|
|
183
206
|
{ name: 'Like', value: 'like' },
|
|
@@ -187,9 +210,20 @@ exports.segmentFields = [
|
|
|
187
210
|
{ name: 'Starts With', value: 'startsWith' },
|
|
188
211
|
{ name: 'Ends With', value: 'endsWith' },
|
|
189
212
|
{ name: 'Contains', value: 'contains' },
|
|
213
|
+
{ name: 'In', value: 'in' },
|
|
214
|
+
{ name: 'Not In', value: '!in' },
|
|
215
|
+
{ name: 'Between', value: 'between' },
|
|
216
|
+
{ name: 'Not Between', value: '!between' },
|
|
190
217
|
],
|
|
191
218
|
default: 'like',
|
|
192
219
|
},
|
|
220
|
+
{
|
|
221
|
+
displayName: 'Display',
|
|
222
|
+
name: 'display',
|
|
223
|
+
type: 'string',
|
|
224
|
+
default: '',
|
|
225
|
+
description: 'Optional display name for the filter',
|
|
226
|
+
},
|
|
193
227
|
],
|
|
194
228
|
},
|
|
195
229
|
],
|
package/package.json
CHANGED