Overview
This node integrates with the MailAir email marketing platform, enabling users to manage email lists, list fields, segments, and subscribers. It supports a wide range of actions such as creating and updating list fields, managing subscribers individually or in bulk, retrieving lists and their details, searching subscribers by email, and unsubscribing subscribers.
Common scenarios where this node is beneficial include:
- Automating subscriber management workflows (e.g., adding new subscribers, updating subscriber information).
- Synchronizing subscriber data between MailAir and other systems.
- Managing custom fields for email lists to capture additional subscriber information.
- Retrieving detailed list and segment data for reporting or further processing.
- Bulk importing subscribers into a list.
Practical examples:
- Automatically add new customers from an e-commerce platform to a MailAir mailing list.
- Update subscriber preferences based on user interactions tracked elsewhere.
- Retrieve all confirmed subscribers from a specific segment for targeted campaigns.
- Create custom fields in a list to collect demographic data during sign-up.
Properties
| Name | Meaning |
|---|---|
| Action | The operation to perform. Options include: Create a List Field, Create a Subscriber, Create Subscribers in Bulk, Create/Update a Subscriber, Get All List Fields, Get All List Segments, Get All Lists, Get All Subscribers, Get One List, Get One List Field, Get One List Segment, Get One Subscriber, Get Subscribers By Status, Search Subscriber By Email, Unsubscribe a Subscriber, Update a List Field, Update a Subscriber. |
| List Name or ID | The target email list to operate on. Can be selected from existing lists or specified via expression. Required for most actions involving lists. |
| Segment ID | Unique identifier of a list segment. Required for actions that retrieve or manipulate segments or subscribers within a segment. |
| Subscriber ID | Unique identifier of a subscriber. Required for actions targeting a specific subscriber. |
| Field Name or ID | Identifier of a list field. Used when retrieving or updating a specific field in a list. |
| Email address of a subscriber. Required when creating, searching, or updating a subscriber. | |
| Segment Name | Name of a segment to create. |
| Current Page to Retrieve | Pagination parameter specifying which page of results to fetch when listing items. |
| Items per Page to Retrieve | Pagination parameter specifying how many items to fetch per page when listing items. |
| The Status Value | Filter to retrieve subscribers by status, either "Confirmed" or "Unconfirmed". |
| Create if Not Exists | Boolean flag indicating whether to create a subscriber if not found during a create/update operation. |
| Type Name or ID | The type of a list field when creating a new field. Loaded dynamically from available field types. |
| Label | Label of a list field when creating or updating it. |
| Tag | Tag identifier of a list field when creating or updating it. |
| Required | Whether the list field is mandatory. |
| Visibility | Whether the list field is visible or hidden. |
| Sort Order | Numeric order for displaying the field in forms. |
| Help Text | Help text associated with the list field. |
| Default Value | Default value for the list field. |
| Description | Description of the list field. |
| Options | Options for the list field (e.g., dropdown values). |
| Min Length | Minimum length for text fields. |
| Max Length | Maximum length for text fields (max 255). |
| Content Rule | Validation rule for text fields (e.g., alpha_ci, alphanum_ci). |
| Content Regex | Regular expression to validate the field value. |
| Allowed Scheme | Allowed URL schemes for URL fields. |
| Whitelist Domains | Whitelisted domains for URL fields. |
| Blacklist Domains | Blacklisted domains for URL fields. |
| Max Stars | Maximum stars for rating fields. |
| Default Country | Default country code for phone fields (e.g., us, ro, bg). |
| Field Mapping | Collection of mappings between incoming data keys and MailAir field names or IDs, used when creating or updating subscribers, including bulk creation. |
| Subscribers JSON Array | JSON array of subscriber objects for bulk creation. |
Output
The node outputs a single JSON object containing the response from the MailAir API corresponding to the selected action. This typically includes:
- For retrieval actions (e.g., getAllLists, getOneList): Data about lists, fields, segments, or subscribers.
- For creation or update actions: Details of the created or updated resource.
- For search actions: Subscriber data matching the search criteria.
- For bulk operations: Summary of the bulk creation result.
The output is structured as a JSON object under the json key in the node's output data. The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the MailAir API.
- Needs network access to the MailAir API endpoint specified in the credentials.
- Uses HTTP requests to interact with the MailAir REST API.
- Pagination parameters are supported for list retrieval endpoints.
Troubleshooting
- Invalid API Key or Authentication Errors: Ensure the API key credential is correctly configured and has sufficient permissions.
- Resource Not Found Errors (404): Verify that provided list IDs, segment IDs, subscriber IDs, or field IDs exist and are correct.
- Validation Errors When Creating or Updating Fields/Subscribers: Check that required properties are set and conform to expected formats (e.g., valid email addresses, field tags).
- Bulk Creation Failures: Validate the JSON structure of the subscribers array; malformed JSON or missing required fields can cause errors.
- Pagination Issues: If no results are returned, verify that the page number and items per page parameters are set appropriately.
- Create/Update Subscriber Logic: When using the create/update subscriber action with "Create if Not Exists" enabled, ensure the email exists or handle the case where the subscriber is not found gracefully.
Links and References
- MailAir API Documentation (hypothetical link)
- n8n Expressions Documentation
- n8n Node Development Guide