Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

The "Staff - Get Many" operation in this node allows users to retrieve multiple staff records from the Magnet Customer API. This is useful for scenarios where you need to list or process information about multiple staff members, such as generating reports, syncing staff data with other systems, or automating workflows that involve staff details.

For example, a user might want to fetch all active staff members to assign tasks automatically or to update their contact information in another system.

Properties

Name Meaning
Authentication Method of authentication to use: either "API Token" or "OAuth2".
Page The page number of results to retrieve (used for pagination).
Limit Maximum number of staff records to return. Minimum value is 1.

Note: There are several hidden properties related to "Life Cycle" and "Source" which are preset and not exposed for user input in this operation.

Output

The output is a JSON array where each element represents a staff member object retrieved from the Magnet Customer API. Each staff object contains fields describing the staff member's details such as name, ID, status, and other relevant attributes as defined by the API.

If the node supports binary data output for staff-related files or images, it would be summarized here; however, based on the provided code, the output is purely JSON data representing staff records.

Dependencies

  • Requires access to the Magnet Customer API.
  • Requires an API key credential or OAuth2 token configured in n8n for authentication.
  • The node uses internal helper functions to make HTTP requests to the API endpoints.
  • Pagination support via page and limit parameters.

Troubleshooting

  • Common Issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Requesting a page number or limit outside the valid range may result in empty responses or errors.
    • Network connectivity issues can prevent successful API calls.
  • Error Messages:

    • Errors returned from the API will be caught and included in the output if "Continue On Fail" is enabled.
    • Typical error messages include authentication errors ("Invalid API token"), rate limiting, or invalid parameter errors.
  • Resolutions:

    • Verify that the API token or OAuth2 credentials are correctly set up in n8n.
    • Ensure the page and limit values are within acceptable ranges.
    • Check network connectivity and API service status.

Links and References

Discussion