Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

The node integrates with the Magnet Customer API to perform various operations on different resources, including workspaces. Specifically, the "Get Many" operation for the Workspace resource retrieves multiple workspace records from the Magnet Customer system. This is useful for scenarios where you want to list or process multiple workspaces at once, such as syncing workspace data into another system, generating reports, or filtering workspaces based on certain criteria.

Practical examples:

  • Fetching a paginated list of workspaces to display in a dashboard.
  • Filtering workspaces that have no associated emails or phone numbers.
  • Sorting workspaces by creation date or name to prioritize processing.

Properties

Name Meaning
Authentication Method of authentication to use: "API Token" or "OAuth2".
Page The page number of results to retrieve (pagination). Default is 1.
Limit Maximum number of workspace records to return per request. Minimum value is 1. Default is 15.
Filters Collection of filters to apply when retrieving workspaces:
- Emails Empty: Filter workspaces with empty email fields (true/false).
- Phones Empty: Filter workspaces with empty phone fields (true/false).
- Interactions Empty: Filter workspaces with no interactions (true/false).
Sort Collection specifying sorting options:
- Sort By: Field to sort by, e.g., "email", "createdAt", "name".
- Sort Type: Direction of sorting, either "Ascending" or "Descending".

Note: Several hidden properties related to "Life Cycle" and "Source" exist but are not exposed for user configuration.

Output

The node outputs an array of JSON objects representing workspace records retrieved from the Magnet Customer API. Each object contains the workspace's data fields as returned by the API, which typically include identifiers, names, contact information, and metadata.

If binary data were involved, it would be summarized here, but this operation deals only with JSON data.

Dependencies

  • Requires access to the Magnet Customer API.
  • Requires credentials configured in n8n for authentication, either via an API token or OAuth2.
  • No additional external dependencies beyond the Magnet Customer API and proper credential setup.

Troubleshooting

  • Common issues:
    • Authentication failures due to invalid or expired API tokens or OAuth2 tokens.
    • Pagination parameters out of range causing empty results.
    • Applying incompatible filters may result in no data returned.
  • Error messages:
    • Errors from the API will be caught and can appear in the output as error messages if "Continue On Fail" is enabled.
    • Common errors include unauthorized access, rate limiting, or invalid parameter values.
  • Resolutions:
    • Verify and refresh credentials.
    • Adjust pagination and filter settings.
    • Check API limits and usage quotas.

Links and References

Discussion