Neo4j List Bookings
Neo4j List Bookings
AI-generatedOverview
This node, Neo4j List Bookings, queries and lists booking records stored in a Neo4j graph database. It allows filtering bookings by various criteria such as business ID, customer ID, staff ID, date range, and booking status. The results are sorted by booking time in descending order and limited to a specified maximum number.
Common scenarios where this node is beneficial:
- Retrieving all bookings for a specific business within a date range.
- Filtering bookings handled by a particular staff member.
- Checking the status of bookings (e.g., confirmed, cancelled, completed) for reporting or follow-up.
- Integrating booking data into workflows that require up-to-date appointment information from a Neo4j database.
Practical example:
A salon manager wants to generate a list of all confirmed bookings for May 2025, handled by a specific stylist. They can configure this node with the business ID, staff ID, start and end dates covering May 2025, and status set to "Confirmed" to retrieve the relevant bookings efficiently.
Properties
| Name | Meaning |
|---|---|
| Business ID | The ID of the business whose bookings you want to query. (Required) |
| Customer ID | The ID of the customer to filter bookings by. |
| Staff ID | The ID of the staff member who served the booking. |
| Start Date | The start date to filter bookings from (inclusive). Format: YYYY-MM-DD or ISO datetime. |
| End Date | The end date to filter bookings until (inclusive). Format: YYYY-MM-DD or ISO datetime. |
| Status | The booking status to filter by, e.g., Confirmed, Cancelled, Completed. |
| Limit | Maximum number of booking records to return. Minimum value is 1. Default is 50. |
Output
The node outputs an array of JSON objects, each representing a booking record with the following fields:
bookingId: Unique identifier of the booking.bookingTime: Booking timestamp as a string.status: Current status of the booking.notes: Any notes associated with the booking.customerName: Name of the customer who made the booking.staffName: Name of the staff member serving the booking.serviceName: Name of the service booked.businessName: Name of the business where the booking was made.
Each output item corresponds to one booking matching the filter criteria.
The node does not output binary data.
Dependencies
- Requires a Neo4j database connection configured via credentials including host, port, username, password, and optionally database name.
- Uses the official Neo4j driver to connect and run Cypher queries.
- Requires proper API authentication credentials to access the Neo4j instance.
- Uses the Luxon library for date-time parsing and formatting.
Troubleshooting
- Connection errors: If the node cannot connect to Neo4j, verify that the host, port, username, and password are correctly configured and that the Neo4j server is reachable.
- Invalid date formats: Start Date and End Date must be valid ISO date strings or date-time strings. Invalid formats will cause those filters to be ignored with a warning logged.
- Missing required property: Business ID is mandatory; omitting it will cause an error.
- Query failures: Errors during query execution may indicate malformed parameters or issues with the Neo4j database schema.
- Empty results: If no bookings match the filters, the output will be empty but no error is thrown.
- Resource cleanup: The node attempts to close sessions and drivers properly; errors during closing are logged but do not stop execution.
To resolve common errors, ensure all required credentials and parameters are correct, and check Neo4j server availability.