Actions18
- Favorites Actions
- Groups Actions
- History Events Actions
- Leads Actions
- Saved Searches Actions
Overview
The "Update Lead" operation in the OmahaHomesForSale custom node allows users to update an existing lead's information in the Lead Management system by specifying the lead's email address and any fields to be updated. This operation is useful when you want to modify details of a lead without affecting other data, such as updating contact information, preferences, or assignment to agents.
Common scenarios include:
- Updating a lead’s phone number or address after receiving new information.
- Changing the agent assigned to a lead.
- Modifying marketing opt-in preferences.
- Adding comments or notes based on recent interactions.
Practical example: If a lead calls your office and provides a new phone number and preferred contact method, you can use this operation to update those specific fields while leaving all other lead data intact.
Properties
| Name | Meaning |
|---|---|
| The e-mail address of the lead to update (required). | |
| Additional Fields | A collection of optional fields that can be updated for the lead. These include: |
| - Alternative email | The lead's alternate e-mail address. |
| - Agent Id | Identifier of the Agent record to assign the lead to. Use 1 for Super Admin. Leave blank to auto-assign based on system settings. |
| - First Name | The lead's first name. |
| - Last Name | The lead's last name. |
| - Password | The lead's password for IDX login, if required by the CRM setup. |
| - Address | The lead's physical address. |
| - City | The lead's city. |
| - State | The lead's state. |
| - Zip Code | The lead's ZIP/Postal code. |
| - Phone | The lead's primary phone number. |
| - Secundary Phone | The lead's secondary phone number. |
| - Work Phone | The lead's work phone number. |
| - Fax Phone | The lead's fax number. |
| - Contact Method | Preferred contact method. Accepted values: email, phone, text. |
| - Heat | Lead's heat level indicating interest. Accepted values: hot, mediumhot, warm, lukewarm, cold. |
| - Comments | Comments or message related to the lead, e.g., from form submissions. |
| - Origin | Lead's origin or referrer, typically a domain name like google.com. |
| - Keywords | Search engine keywords associated with the lead. |
| - Marketing Option | Whether the lead is opted into mass and campaign emails. Accepted values: in, out. Defaults to out if not specified. |
| - Searches Option | Whether the lead is opted into saved search alert emails. Accepted values: in, out. Defaults to out if not specified. |
| - Text Messages Option | Whether the lead is opted into text messages. Accepted values: in, out. Defaults to out if not specified. |
| - Groups | Comma-separated list of group IDs to assign the lead to, e.g., 1, 2, 3. |
| - Auto Rotate | Whether the lead can be auto-rotated away from their current agent. Accepted values: true, false. Defaults to false if not specified. |
| - Number of visits | Number of distinct visit sessions started by the lead. Defaults to 0 if not specified. |
Output
The output is a JSON array where each element corresponds to the response from the API for each input item processed. For the "Update Lead" operation, the JSON output contains the updated lead object returned by the API, reflecting the changes made.
Example output structure (simplified):
[
{
"id": 123,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "555-1234",
"agent_id": 5,
"opt_marketing": "in",
...
}
]
If an error occurs during the update, the output will contain an object with an error message and possibly additional error details.
Dependencies
- Requires an API key credential for authentication with the Omaha Homes For Sale API.
- The node makes HTTP requests to the base URL:
http://www.omahahomesforsale.com/api/crm/v1. - Proper configuration of the API key credential in n8n is necessary.
- The API expects JSON content type and uses a custom header for the API key.
Troubleshooting
Common issues:
- Invalid or missing API key: The API will return 401 Unauthorized errors.
- Incorrect email address: If the lead does not exist, the update may fail or return an error.
- Invalid field values: Providing unsupported values for enumerated fields (e.g.,
contactMethod,heat, or opt-in options) may cause validation errors. - Network connectivity issues to the API endpoint.
Error messages:
400 Bad Request: Usually indicates invalid input data or missing required fields. Check that the email is provided and that all fields conform to expected formats and accepted values.401 Unauthorized: Indicates authentication failure. Verify that the API key credential is correctly configured and valid.- Other HTTP errors will include error messages from the API; review these messages for clues.
Resolution tips:
- Ensure the email parameter is correct and corresponds to an existing lead.
- Validate all optional fields against allowed values.
- Confirm API key validity and permissions.
- Enable "Continue On Fail" in the node settings to handle partial failures gracefully.
Links and References
- Omaha Homes For Sale API documentation (general reference): http://www.omahahomesforsale.com/api/crm/v1 (base URL)
- n8n HTTP Request node documentation for understanding request handling: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/
- Best practices for managing API credentials in n8n: https://docs.n8n.io/integrations/credentials/