Neo4j Delete Customer icon

Neo4j Delete Customer

根據 customer_id 刪除客戶及其關聯關係。,customerId: 要刪除的客戶 ID (UUID)。

Neo4j Delete Customer

AI-generated

Overview

This node deletes a customer and all their related connections from a Neo4j graph database based on a specified customer ID. It is useful in scenarios where you need to remove a customer record entirely, including all relationships that the customer node has with other nodes, ensuring no orphaned relationships remain.

Practical examples include:

  • Cleaning up customer data when a user account is deleted.
  • Removing test or obsolete customer entries from the database.
  • Automating data maintenance workflows that require purging specific customer information.

Properties

Name Meaning
Customer ID The unique identifier (UUID) of the customer to delete.

Output

The node outputs JSON objects for each input item processed. Each output item contains:

  • success: A boolean indicating whether the deletion was successful.
  • deletedCustomerId: The ID of the customer that was deleted.
  • In case of failure (if "Continue On Fail" is enabled), the output includes the original input JSON merged with an error field describing the failure.

No binary data is produced by this node.

Example output JSON on success:

{
  "success": true,
  "deletedCustomerId": "some-customer-uuid"
}

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 execute Cypher queries.
  • Requires proper configuration of the Neo4j API credentials within n8n.

Troubleshooting

  • Common issues:

    • Missing or incomplete Neo4j credentials will cause the node to fail before attempting any deletion.
    • Connection failures due to incorrect host, port, or authentication details.
    • Attempting to delete a non-existent customer ID will not throw an error but simply result in no node being deleted.
  • Error messages:

    • "Neo4j credentials are not fully configured or missing required fields": Check that all required credential fields are filled correctly.
    • "Failed to establish Neo4j connection or session.": Verify network connectivity and Neo4j server status.
    • "Neo4j session is not available.": Indicates internal session management failure; retry or check logs.
  • Resolution tips:

    • Ensure Neo4j server is running and accessible.
    • Double-check credentials and permissions.
    • Use the node's logging output to diagnose connection or query issues.
    • Enable "Continue On Fail" if you want the workflow to proceed despite individual item errors.

Links and References

Discussion