Create
AI-generatedOverview
This node creates a new service record associated with a specific business in a Neo4j graph database. It is designed to add detailed service information such as name, duration, description, price, and booking mode under an existing business entity.
Common scenarios:
- Adding new services offered by a business in appointment or booking systems.
- Managing service catalogs dynamically within a Neo4j-powered backend.
- Integrating service creation into workflows that automate business data management.
Practical example:
A salon uses this node to add a new haircut service specifying its duration (e.g., 30 minutes), description, price in cents, and how bookings should be handled (e.g., time only or staff and resource). This allows the salon's scheduling system to reflect the new service immediately.
Properties
| Name | Meaning |
|---|---|
| Business ID | The unique identifier (UUID) of the business providing this service. |
| Name | The name of the service being created. |
| Duration (Minutes) | Length of the service in minutes (integer). |
| Description | A textual description of the service. |
| Price (Integer) | The price of the service as an integer value (e.g., in cents). Optional; defaults to 0. |
| Options | Collection of additional settings for the service: |
| - Booking Mode (UI Setting) | Defines the booking check mode for the service. Possible values: Time Only, Staff Only, Resource Only, Staff And Resource. |
Output
The node outputs JSON objects representing the newly created service nodes from Neo4j. Each output item contains a service object with all properties stored in the database, including:
service_id: Unique UUID generated for the service.name: Service name.duration_minutes: Duration in minutes.description: Service description.price: Service price as an integer.booking_mode: Booking mode setting.created_at: Timestamp of creation.
No binary data output is produced by this node.
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.
- Needs proper permissions to create nodes and relationships in the target Neo4j database.
Troubleshooting
- Connection errors: If the node fails to connect, verify that the Neo4j credentials are complete and correct (host, port, username, password).
- Invalid booking mode: Selecting a booking mode outside the allowed options (
TimeOnly,StaffOnly,ResourceOnly,StaffAndResource) will cause an error. Ensure the booking mode matches one of these values. - Missing business node: The Cypher query assumes a business node with the given
businessIdexists. If it does not, the service creation will fail silently or return no results. Confirm the business node exists before creating services. - Session or driver errors: Errors related to session or driver lifecycle indicate issues with Neo4j connectivity or resource cleanup. Restarting the workflow or checking Neo4j server status may help.
- Error messages: The node throws descriptive errors wrapped in n8n’s NodeOperationError, often including parsed Neo4j error details for easier debugging.