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 node integrates with the Magnet Customer API to update prospect records. It allows users to modify detailed information about a prospect, such as contact details, demographic data, and custom fields. This is useful in scenarios where you need to keep your CRM or marketing database up-to-date with the latest prospect information, for example, after receiving new data from a lead generation form or an external system.
Practical examples include:
- Updating a prospect's email and phone numbers after a user submits updated contact info.
- Modifying demographic details like gender, birthdate, or marital status based on new insights.
- Adding or changing custom fields dynamically to capture additional prospect attributes not predefined in the system.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication to use: API Token or OAuth2. |
| Contact ID | The unique identifier of the prospect to update (required). |
| Fullname | The full name of the prospect (required). |
| The email address of the prospect. | |
| Phones | Collection of phone numbers to add or update for the prospect. Each entry includes a "Number" field representing the phone number value. |
| Gender | The gender of the prospect. Options are Male (M) or Woman (F). |
| Birthdate | The birthdate of the prospect. |
| Work | The work or occupation of the prospect. |
| Marital Status | The marital status of the prospect. |
| Document (CPF/CNPJ) | The document number of the prospect (e.g., CPF or CNPJ identifiers). |
| Legal Type | The legal type of the prospect. Options are Physical or Legal. |
| State | The state where the prospect resides. |
| City | The city where the prospect resides. |
| Address | The street address of the prospect. |
| Address Number | The number portion of the address. |
| Complement Address | Additional address information (e.g., apartment, suite). |
| Neighborhood | The neighborhood of the prospect. |
| CEP | Postal code (CEP) of the prospect's address. |
| Owners | Owners associated with the prospect. |
| Custom Fields | A collection of custom fields to set on the prospect. Each custom field requires a property name or ID and a corresponding value. This allows setting values for fields not predefined in the standard properties. |
| Encode Custom Fields | Boolean flag indicating whether custom fields should be automatically encoded. By default, custom fields require IDs instead of names, and option fields require IDs instead of values. Enabling this automates encoding. |
| Source | Hidden property set to "n8n" indicating the source of the contact record. |
| Life Cycle | Hidden property set to "prospect" indicating the life cycle stage of the contact. |
Output
The node outputs JSON data representing the updated prospect record(s) returned by the Magnet Customer API. The structure typically includes all fields of the prospect after the update, including any custom fields that were set or modified.
If the operation fails for any item and "Continue On Fail" is enabled, the output will contain an error object with the error message for that specific item.
This node does not output binary data.
Dependencies
- Requires access to the Magnet Customer API.
- Requires either an API token or OAuth2 credentials configured in n8n for authentication.
- The node depends on internal helper functions to make HTTP requests to the API endpoints related to prospects.
- For custom fields, it may load available custom field options dynamically via API calls.
Troubleshooting
- Invalid Prospect ID: If the provided prospect ID does not exist or is incorrect, the API will return an error. Verify the ID before running the node.
- Authentication Errors: Ensure that the API token or OAuth2 credentials are valid and have sufficient permissions to update prospects.
- Custom Field Encoding Issues: If custom fields are not encoded properly, the API might reject the request. Use the "Encode Custom Fields" option to automate encoding.
- Required Fields Missing: The "Fullname" and "Contact ID" fields are required. Omitting them will cause errors.
- API Rate Limits: If updating many prospects in bulk, watch out for API rate limits which could cause failures.
- Error Messages: Errors returned by the API are passed through; check the error message for clues. Common messages relate to invalid input data or permission issues.
Links and References
- Magnet Customer API Documentation (generic placeholder link)
- n8n Expressions Documentation - for using expressions in custom fields
- n8n Credential Setup - how to configure API tokens and OAuth2 credentials in n8n