Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

This node integrates with the Magnet Customer API to retrieve data about custom fields defined in the system. Specifically, the "Get" operation for the "Custom Field" resource fetches details of a single custom field by its ID.

Use cases include:

  • Retrieving metadata or configuration details about a specific custom field used in customer records.
  • Dynamically accessing custom field definitions to build forms or validate data.
  • Integrating with other systems that require knowledge of custom field properties.

For example, you might use this node to get the definition of a custom field before updating customer data or to display custom field information in a dashboard.

Properties

Name Meaning
Authentication Method of authentication to use: "API Token" or "OAuth2".
Custom Field ID The unique identifier of the custom field to retrieve. This is required for the Get operation on the Custom Field resource.

Note: The provided properties JSON includes several hidden "lifeCycle" and "source" fields related to contact lifecycle stages and source attribution, but these are not relevant for the "Custom Field" Get operation based on the code and property display options.

Output

The output is a JSON object representing the retrieved custom field's details. This typically includes all metadata associated with the custom field such as its name, type, options, and any other configuration stored in the Magnet Customer system.

The node does not output binary data.

Example output structure (simplified):

{
  "_id": "string",
  "name": "string",
  "type": "string",
  "options": [ /* array of option values if applicable */ ],
  "system": false,
  "feature": "string",
  // ... other custom field properties
}

Each item in the output corresponds to one input item processed.

Dependencies

  • Requires access to the Magnet Customer API.
  • Requires an API key credential or OAuth2 credentials configured in n8n for authentication.
  • The node uses internal helper functions to make HTTP requests to the Magnet Customer API endpoints.

Troubleshooting

  • Invalid Custom Field ID: If the provided custom field ID does not exist or is malformed, the API will likely return an error. Verify the ID is correct.
  • Authentication Errors: Ensure the API token or OAuth2 credentials are valid and have sufficient permissions.
  • Network Issues: Connectivity problems to the Magnet Customer API endpoint can cause failures.
  • Continue On Fail: If enabled, errors for individual items will be returned in the output JSON under an error field instead of stopping execution.

Common error messages:

  • "Unauthorized": Check API credentials.
  • "Not Found": The custom field ID does not exist.
  • "Bad Request": Input parameters may be invalid or missing.

Links and References

Discussion