Neo4j Delete Booking
AI-generatedOverview
This node deletes a booking record from a Neo4j graph database based on a specified Booking ID. It is designed to remove the booking node and all its related relationships, effectively cleaning up any associated data in the graph.
Common scenarios where this node is useful include:
- Canceling or removing reservations in a booking system.
- Cleaning up test or obsolete booking data from a Neo4j database.
- Automating deletion workflows where bookings need to be removed programmatically.
For example, if you have a booking management system integrated with Neo4j, you can use this node to delete a booking by providing its unique booking ID, ensuring that the booking and all its connected relationships are removed from the database.
Properties
| Name | Meaning |
|---|---|
| Booking ID | The unique identifier (UUID) of the booking to delete. |
Output
The node outputs JSON data for each processed input item indicating the success status and the deleted booking ID. The structure is as follows:
{
"success": true,
"deletedBookingId": "the-booking-id-used"
}
If an error occurs during deletion and the node is configured to continue on failure, the output JSON will include the original input data merged with an error field describing the issue.
The node does not output binary data.
Dependencies
- Requires a Neo4j database instance accessible via host, port, username, password, and optionally a database name.
- Needs an API key credential or equivalent authentication token configured in n8n to connect securely to the Neo4j database.
- Uses the official Neo4j driver library to establish connections and run Cypher queries.
Troubleshooting
- Missing or incomplete credentials: The node throws an error if the Neo4j connection details (host, port, username, password) are missing or incomplete. Ensure all required fields are correctly set in the node credentials.
- 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 ID: If the provided Booking ID does not exist, the Cypher query will not delete any nodes but typically will not throw an error. Confirm the Booking ID is correct.
- Session or driver closure errors: Errors closing the Neo4j session or driver are logged but do not usually affect the main operation.
- Error handling: If the node is set to continue on fail, errors during individual deletions are captured in the output JSON with detailed messages parsed from Neo4j error responses.