Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

The node "Magnet Customer" integrates with the Magnet Customer API, enabling users to interact with various resources such as customers, deals, leads, organizations, staff, tasks, pipelines, and custom fields. Specifically, for the Custom Field resource with the Search operation, the node allows searching and filtering of custom fields based on multiple criteria.

This node is beneficial in scenarios where you need to dynamically retrieve custom field definitions or data from the Magnet Customer system, for example:

  • Searching for specific custom fields related to contacts, deals, or organizations.
  • Filtering custom fields by feature type (e.g., contact, deal) or lifecycle stage (contact, lead, prospect).
  • Limiting and sorting search results to efficiently manage large sets of custom fields.

Practical example: You want to fetch all custom fields related to contacts that are creatable when the contact is a lead, filter out those without emails, and sort them by name ascendingly.

Properties

Name Meaning
Authentication Method of authentication to use with the API. Options: API Token, OAuth2.
Search Term Optional string to filter custom fields by a search term.
Filters Collection of filters to narrow down the search results:
- Feature: Filter by feature type (contact, deal, organization, staff).
- Creatable When: Filter by contact lifecycle stage (contact, lead, prospect).
- Emails Empty: Boolean to filter fields where emails are empty.
- Phones Empty: Boolean to filter fields where phones are empty.
- Interactions Empty: Boolean to filter fields where interactions are empty.
Limit Maximum number of results to return. Minimum value is 1. Default is 15.
Sort Collection to specify sorting options:
- Sort By: Field to sort by (e.g., email, name, createdAt).
- Sort Type: Direction of sorting (Ascending, Descending).

Output

The output is an array of JSON objects representing the custom fields matching the search criteria. Each object contains the properties of a custom field as returned by the Magnet Customer API.

  • The json output field includes detailed information about each custom field found.
  • No binary data output is indicated for this operation.

Dependencies

  • Requires connection to the Magnet Customer API.
  • Supports two authentication methods: API Token or OAuth2.
  • Requires appropriate credentials configured in n8n for authentication.
  • Uses internal helper functions to make API requests and handle pagination if needed.

Troubleshooting

  • Common issues:

    • Authentication failures due to invalid or missing API token or OAuth2 credentials.
    • Incorrect filter values causing no results to be returned.
    • Exceeding API rate limits or request quotas.
  • Error messages:

    • Errors from the API will be caught and returned as part of the node's output if "Continue On Fail" is enabled.
    • Typical error messages include authentication errors, invalid parameters, or network issues.
  • Resolutions:

    • Verify that the API credentials are correctly set up and valid.
    • Double-check filter values and ensure they conform to expected options.
    • Use smaller limits or add delays between requests to avoid rate limiting.

Links and References

Discussion