Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

The "Lead Search" operation in this node allows users to search for leads within the Magnet Customer system by specifying a search string. This is useful for quickly finding lead records that match certain criteria, such as names, emails, or other searchable fields. Typical use cases include integrating lead lookup into workflows for sales automation, marketing campaigns, or CRM data enrichment.

For example, a user might input a partial name or email address to retrieve matching leads and then use that data to trigger follow-up actions like sending emails or updating lead statuses.

Properties

Name Meaning
Authentication Method of authentication to use: either "API Token" or "OAuth2".
Search The search string to look for in leads. Must be at least 3 characters long.
Life Cycle (Hidden) The life cycle stage of the contact; for this operation, it defaults to "lead".
Source (Hidden) The source of the contact; defaults to "n8n".

Note: The properties Life Cycle and Source are hidden and preset internally to ensure the search targets the correct subset of contacts classified as leads originating from n8n.

Output

The output is a JSON array where each item represents a lead record matching the search criteria. Each lead object contains the lead's details as returned by the Magnet Customer API. The exact structure depends on the API response but typically includes identifiers, names, contact information, and any custom fields associated with the lead.

No binary data output is involved in this operation.

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 authenticated requests to the Magnet Customer API endpoints.

Troubleshooting

  • Search String Too Short: The search property requires a minimum of 3 characters. Providing fewer will likely result in no results or an error.
  • Authentication Errors: If the API key or OAuth2 token is invalid or expired, the node will fail to authenticate. Ensure credentials are correctly set up and valid.
  • No Results Found: If the search term does not match any leads, the output will be empty. Verify the search string and consider broadening the query.
  • API Rate Limits: Excessive requests may hit API rate limits causing errors. Implement delays or reduce request frequency if needed.
  • Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error messages in the output JSON.

Links and References

Discussion