Magnet Customer icon

Magnet Customer

Consume Magnet Customer API

Overview

This node integrates with the Magnet Customer API to create a new prospect contact record. It is designed to help users add detailed prospect information into their CRM system, facilitating lead management and customer acquisition workflows. Typical use cases include automating the addition of new prospects collected from web forms, marketing campaigns, or other lead generation sources.

For example, a marketing automation workflow could use this node to automatically create a prospect in the CRM whenever a visitor fills out a contact form on a website, including details like full name, email, phone numbers, and custom fields.

Properties

Name Meaning
Authentication Method of authentication: "API Token" or "OAuth2".
Fullname The full name of the prospect contact (required).
E-Mail The email address of the prospect contact.
Phones Collection of phone numbers associated with the prospect.
Gender Gender of the prospect: "Male" (M) or "Woman" (F).
Birthdate Birthdate of the prospect contact.
Work The workplace or job title of the prospect.
Marital Status Marital status of the prospect.
Document (CPF/CNPJ) Identification document number of the prospect (Brazilian CPF or CNPJ).
Legal Type Legal classification of the prospect: "Physical" (individual) or "Legal" (company).
State State where the prospect resides.
City City where the prospect resides.
Address Street address of the prospect.
Address Number Number of the street address.
Complement Address Additional address information (e.g., apartment, suite).
Neighborhood Neighborhood of the prospect's address.
CEP Postal code (CEP) of the prospect's address.
Owners Owners associated with the prospect.
Custom Fields Collection of additional custom fields to set on the prospect, allowing for extensible data.
Life Cycle Hidden property indicating the life cycle stage; preset to "prospect" for this resource.
Source Hidden property indicating the source of the contact; preset to "n8n".

Output

The node outputs JSON data representing the created prospect record as returned by the Magnet Customer API. This typically includes all the fields sent during creation along with any additional metadata assigned by the API, such as unique IDs or timestamps.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Magnet Customer API.
  • Supports two authentication methods: API token or OAuth2.
  • Requires appropriate credentials configured in n8n for authentication.
  • The node depends on internal helper functions to make HTTP requests to the API endpoints.

Troubleshooting

  • Authentication errors: Ensure that the API token or OAuth2 credentials are correctly configured and have sufficient permissions to create prospects.
  • Validation errors: Required fields like "Fullname" must be provided; missing or invalid data may cause the API to reject the request.
  • Custom fields issues: When using custom fields, ensure the field names or IDs exist in the Magnet Customer system and are correctly referenced.
  • Network or API downtime: Temporary connectivity issues or API outages will cause request failures; retry or check API status.
  • Error messages: If the node throws errors containing messages from the API, review the message for clues (e.g., "Invalid email format", "Missing required field") and adjust input accordingly.

Links and References

Discussion