Neo4j Update Business
AI-generatedOverview
This node updates business information in a Neo4j graph database based on a specified business ID. It allows users to modify various attributes of a business entity such as name, type, address, contact details, timezone, description, and booking mode settings. The node is useful for workflows that need to maintain or synchronize up-to-date business data within a Neo4j database, for example, updating business profiles after receiving new input from a CRM system or an admin interface.
Practical examples:
- Updating the contact phone and email of a business after customer service changes.
- Changing the business's timezone or description to reflect new operational details.
- Adjusting the booking mode UI setting dynamically based on external inputs.
Properties
| Name | Meaning |
|---|---|
| Business ID | The unique identifier (UUID) of the business to update. |
| Name | New name of the business (optional). |
| Type | New type/category of the business (optional). |
| Address | New physical address of the business (optional). |
| Phone | New contact phone number for the business (optional). |
| New contact email address for the business (optional). | |
| Timezone | New timezone of the business location (e.g., Asia/Taipei or +08:00) (optional). |
| Description | New descriptive text about the business (optional). |
| Options | Collection of additional options: |
| - Booking Mode (UI Setting) | Controls the booking check mode in the UI with possible values: "Time Only", "Staff Only", "Resource Only", "Staff And Resource". If the input data contains query.Booking_Mode, it takes precedence over this option. Leaving empty means no update to this field. |
Output
The node outputs JSON data representing the updated business record retrieved from Neo4j after the update operation. The structure includes all properties of the business node as stored in the database under the alias business. If no update parameters are provided, it returns the current business data without modification.
No binary data output is produced by this node.
Example output JSON snippet:
{
"business": {
"business_id": "uuid-string",
"name": "Updated Business Name",
"type": "Retail",
"address": "123 Example St",
"phone": "+1234567890",
"email": "contact@example.com",
"timezone": "Asia/Taipei",
"description": "A newly updated description",
"booking_mode": "TimeOnly",
"updated_at": "2024-06-01T12:34:56Z"
}
}
Dependencies
- Requires a Neo4j database connection configured via credentials including host, port, username, password, and optionally database name.
- Uses the official Neo4j driver for JavaScript to connect and run Cypher queries.
- The node expects proper configuration of these credentials in n8n before execution.
Troubleshooting
- Missing or incomplete Neo4j credentials: The node will throw an error if any required credential fields (host, port, username, password) are missing or incomplete. Ensure all fields are correctly set.
- Connection failures: Errors connecting to Neo4j or opening a session may occur due to network issues, incorrect credentials, or database unavailability. Verify connectivity and credentials.
- Invalid booking mode values: If the booking mode value from input or UI options is invalid (not one of the allowed four), the node logs a warning and ignores the update for that field.
- No update parameters provided: If none of the optional fields are set, the node returns the current business data without changes and logs a warning.
- Neo4j session or driver closure errors: These are logged but do not typically affect the main operation outcome.