Neo4j Create Business
AI-generatedOverview
This node creates a new Business record in a Neo4j graph database and links it to an existing User node as the owner. It is useful for scenarios where you want to model business entities and their ownership relationships within a graph structure, such as managing salons, clinics, or other types of businesses associated with users.
Practical examples include:
- Adding a new salon owned by a specific user.
- Registering a clinic with detailed contact information and linking it to its owner.
- Building a network of businesses and owners for analytics or CRM purposes.
Properties
| Name | Meaning |
|---|---|
| Owner User ID | Internal ID of the related User node (not the external_id). |
| Name | The name of the business. |
| Type | The type/category of the business (e.g., Salon, Clinic). |
| Address | The physical address of the business. |
| Phone | Contact phone number of the business. |
| Contact email address of the business. | |
| Timezone | Timezone where the business is located (e.g., Asia/Taipei or +08:00). |
| Description | A description of the business. |
Output
The node outputs JSON data representing the newly created Business node with all its properties, including:
business_id: A generated UUID for the business.name,type,address,phone,email,description,timezone: As provided in input.created_at: Timestamp of creation.- The output JSON is structured under the key
business.
If multiple items are processed, the output is an array of such business objects.
No binary data output is produced by this node.
Dependencies
- Requires a Neo4j database connection.
- Needs credentials containing host, port, username, password, and optionally database name.
- Uses the official Neo4j driver for Node.js.
- Requires proper configuration of the Neo4j credentials in n8n.
Troubleshooting
- Connection errors: If the node cannot connect to Neo4j, verify that the host, port, username, and password are correctly configured and that the database is accessible.
- Missing credentials: The node throws an error if any required credential field is missing.
- Invalid ownerUserId: If the specified User node does not exist, the Cypher query will fail; ensure the ownerUserId corresponds to an existing User node's internal ID.
- Session errors: Errors opening or closing the Neo4j session or driver are logged; ensure network stability and correct driver usage.
- Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error details alongside the original item.