Actions68
- Custom Field Actions
- Custom Field Block Actions
- Custom Field Type Actions
- Customer Actions
- Deal Actions
- Lead Actions
- Organization Actions
- Pipeline Actions
- Prospect Actions
- Staff Actions
- Task Actions
- Workspace Actions
Overview
The "Magnet Customer" node integrates with the Magnet Customer API to manage customer data within n8n workflows. Specifically, the Update Customer operation allows users to modify existing customer records by specifying the customer's ID and updating various contact details and custom fields.
This node is beneficial in scenarios where customer information needs to be kept up-to-date automatically, such as syncing CRM data from other systems, updating contact details after form submissions, or enriching customer profiles based on external events.
Practical examples:
- Automatically update a customer's phone number and email when they submit a profile update form.
- Change the customer's address or marital status based on new information received from a third-party service.
- Add or modify custom fields for customers to track additional attributes relevant to your business processes.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication to use: either API Token or OAuth2. |
| Contact ID | The unique identifier of the customer to update (required). |
| Fullname | The full name of the customer (required). |
| The customer's email address. | |
| Phones | A collection of phone numbers to add or update for the customer. Each phone entry includes a "Number" field. |
| Gender | The gender of the customer. Options: Male (M), Woman (F). |
| Birthdate | The birthdate of the customer. |
| Work | The customer's workplace or job description. |
| Marital Status | The marital status of the customer. |
| Document (CPF/CNPJ) | The customer's document number (e.g., CPF or CNPJ in Brazil). |
| Legal Type | The legal type of the customer. Options: Physical, Legal. |
| State | The state or region of the customer's address. |
| City | The city of the customer's address. |
| Address | The street address of the customer. |
| Address Number | The number portion of the customer's address. |
| Complement Address | Additional address information (e.g., apartment, suite). |
| Neighborhood | The neighborhood of the customer's address. |
| CEP | Postal code (CEP) of the customer's address. |
| Owners | Owners associated with the customer record. |
| Custom Fields | A collection of custom fields to set for the customer. Each custom field requires a field name or ID and a value. |
| Encode Custom Fields | Boolean flag indicating whether custom fields should be automatically encoded by converting names and option values to their respective IDs. Defaults to false. Useful if you want to provide human-readable names instead of IDs. |
Note: Several hidden properties like lifeCycle and source are preset internally and not exposed for user input.
Output
The node outputs JSON data representing the updated customer record(s) returned by the Magnet Customer API. This JSON includes all standard and custom fields reflecting the new state of the customer after the update.
If multiple input items are processed, the output is an array of JSON objects corresponding to each updated customer.
The node does not output binary data.
Dependencies
- Requires an active connection to the Magnet Customer API.
- Supports two authentication methods: an API token credential or OAuth2 credential.
- Requires proper configuration of credentials in n8n to authenticate requests.
- Uses internal helper functions to make HTTP requests to the Magnet Customer API endpoints.
Troubleshooting
- Missing or invalid Contact ID: The update operation requires a valid customer ID. Ensure the Contact ID is correctly provided and corresponds to an existing customer.
- Authentication errors: Verify that the API token or OAuth2 credentials are correctly configured and have sufficient permissions.
- Invalid custom field names or values: If custom fields are not encoded properly, the API may reject the request. Use the "Encode Custom Fields" option to automatically convert names/values to IDs.
- API rate limits or connectivity issues: Network problems or API limits can cause failures. Check network connectivity and API usage quotas.
- Error messages returned by the API will typically include details about missing required fields or invalid data formats. Review the error message and adjust input parameters accordingly.
Links and References
- Magnet Customer API Documentation (example placeholder, replace with actual URL if available)
- n8n Documentation - Creating Custom Nodes
- n8n Expressions Guide (useful for dynamic field values)