Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

The "Staff - Get" operation in this node allows users to retrieve detailed information about a specific staff member from the Magnet Customer API. This is useful for scenarios where you need to fetch and use staff data within an automation workflow, such as assigning tasks, sending notifications, or integrating staff details into other systems.

Practical examples include:

  • Fetching a staff member's profile by their ID to display or process their contact information.
  • Retrieving staff details to assign responsibilities dynamically in a CRM or project management tool.
  • Using staff data to generate reports or trigger conditional logic based on staff attributes.

Properties

Name Meaning
Authentication Method of authenticating with the API; options are "API Token" or "OAuth2".
Staff ID The unique identifier of the staff member to retrieve. This is required for the get operation.

Note: Several hidden properties related to "Life Cycle" and "Source" exist but are not relevant for the Staff resource get operation.

Output

The output is a JSON object representing the staff member's data as returned by the Magnet Customer API. It typically includes fields such as the staff member's ID, full name, active status, roles, contact details, and any custom fields associated with the staff.

No binary data output is involved in this operation.

Example structure (simplified):

{
  "_id": "staffId123",
  "fullname": "John Doe",
  "email": "john.doe@example.com",
  "active": true,
  "roles": ["roleId1", "roleId2"],
  "customFields": {
    "field1": "value1",
    "field2": "value2"
  }
}

Dependencies

  • Requires access to the Magnet Customer API.
  • Requires authentication via either an API token or OAuth2 credentials configured in n8n.
  • The node depends on internal helper functions to make HTTP requests to the API endpoints.
  • No additional external services are needed beyond the Magnet Customer API.

Troubleshooting

  • Common issues:

    • Invalid or missing Staff ID: The operation requires a valid staff member ID; ensure it is correctly provided.
    • Authentication errors: Verify that the API token or OAuth2 credentials are correctly set up and have sufficient permissions.
    • Network or API downtime: Check connectivity and Magnet Customer API status if requests fail.
  • Error messages:

    • "Staff member not found": Indicates the provided Staff ID does not exist; verify the ID.
    • "Authentication failed": Check API credentials and re-authenticate if necessary.
    • "Request timeout" or "Network error": Retry after verifying network conditions.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion