Neo4j Create Customer
AI-generatedOverview
This node creates a new customer record in a Neo4j graph database for a specified business and links it to an existing user. It is designed to be used when you want to register a new customer under a particular business entity and associate that customer with a user account already present in the database.
Typical use cases include:
- Adding new customers to a business's CRM system stored in Neo4j.
- Linking customer profiles to user accounts for personalized services or tracking.
- Managing customer relationships and contact information within a graph database structure.
For example, if you have a business identified by a unique ID and a user account, this node will create a customer node with contact details and connect it to both the business and the user nodes via specific relationships.
Properties
| Name | Meaning |
|---|---|
| Business ID | The unique identifier (UUID) of the business under which the customer is registered. |
| User ID | The internal unique identifier (UUID) of the related user node to link with the customer. |
| Name | The customer's full name; can differ from the linked user's name. |
| Phone | The customer's contact phone number. |
| The customer's contact email address. |
Output
The node outputs an array of JSON objects, each representing a created customer. Each output item contains a customer object with all properties of the newly created customer node, including:
customer_id: A generated UUID for the customer.name: Customer's name.business_id: The associated business ID.phone: Customer's phone number.email: Customer's email address.created_at: Timestamp of creation.
No binary data output is produced by this node.
Dependencies
- Requires a Neo4j database connection configured via credentials containing host, port, username, password, and optionally database name.
- The node uses the official Neo4j driver to connect and run Cypher queries.
- Proper Neo4j credentials must be set up in n8n before using this node.
Troubleshooting
- Missing or incomplete Neo4j credentials: The node will throw an error if any required credential fields (host, port, username, password) are missing or empty. Ensure all fields are correctly filled.
- Connection failures: Errors during connecting to Neo4j or opening a session may occur due to network issues, incorrect credentials, or database unavailability. Verify connectivity and credentials.
- Cypher query errors: If the provided business ID or user ID does not exist in the database, the MATCH clause will fail, potentially causing no customer to be created. Confirm that referenced nodes exist.
- Session closure errors: Errors while closing the Neo4j session or driver are logged but do not stop execution. These usually indicate resource cleanup issues.
- Continue on Fail behavior: If enabled, the node will continue processing remaining items even if some fail, appending error details to the output for failed items.