Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

The "Get Many" operation for the "Custom Field" resource in this node allows users to retrieve multiple custom fields from the Magnet Customer API. This operation is useful when you want to fetch a list of custom fields filtered by various criteria such as feature type (e.g., contact, deal, organization, staff), lifecycle stage, or other filters. It supports sorting and limiting the number of results returned.

Practical examples include:

  • Fetching all custom fields related to contacts to dynamically build forms or data mappings.
  • Retrieving custom fields for deals to analyze or report on deal-specific data.
  • Filtering custom fields by lifecycle stage to tailor data retrieval for leads, prospects, or customers.

Properties

Name Meaning
Authentication Method of authentication to use: "API Token" or "OAuth2".
Search Term Optional string to filter the results by a search term.
Filters Collection of filters to narrow down the custom fields:
- Feature: Filter by feature type; options are Contact, Deal, Organization, Staff.
- Creatable When: Filter by contact lifecycle stage; options are Contact, Lead, Prospect.
- Emails Empty: Boolean to filter where emails are empty.
- Phones Empty: Boolean to filter where phones are empty.
- Interactions Empty: Boolean to filter where interactions are empty.
Limit Maximum number of results to return (minimum 1). Default is 15.
Sort Sorting options:
- Sort By: Field to sort by (e.g., email, name, createdAt).
- Sort Type: Direction of sorting; options are Ascending or Descending (default).

Note: Several hidden properties related to "Life Cycle" and "Source" exist but are not user-configurable in this operation.

Output

The node outputs an array of JSON objects representing the retrieved custom fields. Each object corresponds to a custom field with its associated properties as returned by the Magnet Customer API.

If the node supports binary data output for this operation, it is not indicated in the provided code or property definitions, so the output is purely JSON.

Dependencies

  • Requires connection to the Magnet Customer API.
  • Requires either an API token or OAuth2 credentials configured in n8n for authentication.
  • The node uses internal helper functions to make API requests and handle pagination if applicable.

Troubleshooting

  • Common Issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Using unsupported filter values may result in empty responses or errors.
    • Exceeding API rate limits could cause request failures.
  • Error Messages:

    • Errors from the API are caught and returned as error messages in the output if "Continue On Fail" is enabled.
    • Typical error messages include authentication errors, invalid parameters, or network issues.
  • Resolutions:

    • Verify that the API token or OAuth2 credentials are correctly configured.
    • Check that filter values conform to allowed options.
    • Use smaller limits or add delays to avoid rate limiting.

Links and References

Discussion