Neo4j Update Staff icon

Neo4j Update Staff

根據 staff_id 更新員工資訊。,staffId: 要更新的員工 staff_id (UUID),name: 新的員工姓名 (可選),email: 新的員工電子郵件 (可選),phone: 新的員工電話號碼 (可選)。

Neo4j Update Staff

AI-generated

Overview

This node updates staff information in a Neo4j graph database based on a given staff ID. It allows users to modify the name, email, and phone number of an existing staff member identified by their unique staff_id. If no update fields are provided, it simply returns the current data for that staff member.

Common scenarios where this node is useful include:

  • Keeping employee records up-to-date in a Neo4j-based HR or personnel management system.
  • Synchronizing staff details from other systems into a Neo4j database.
  • Automating updates to staff contact information as part of workflow automations.

For example, you might use this node to update the email and phone number of a staff member after receiving new contact details from an external form submission.

Properties

Name Meaning
Staff ID The unique identifier (staff_id) of the staff member whose information will be updated. This is required.
Name The new name of the staff member (optional).
Email The new email address of the staff member (optional).
Phone The new phone number of the staff member (optional).

Output

The node outputs an array of JSON objects representing the updated staff records. Each output item contains a staff field with the full properties of the staff node after the update, including all existing and updated fields.

If no update parameters are provided, the node returns the current staff data without modification.

The node does not output binary data.

Example output JSON structure for one item:

{
  "staff": {
    "staff_id": "uuid-string",
    "name": "Updated Name",
    "email": "updated.email@example.com",
    "phone": "1234567890",
    "updated_at": "2024-06-01T12:34:56.789Z"
    // ... other staff properties if any
  }
}

Dependencies

  • Requires a Neo4j database connection configured via credentials containing host, port, username, password, and optionally database name.
  • Uses the official Neo4j driver to connect and run Cypher queries.
  • Needs proper configuration of the Neo4j credentials in n8n before execution.

Troubleshooting

  • Neo4j credentials are not fully configured: Ensure all required credential fields (host, port, username, password) are correctly set.
  • Failed to establish Neo4j connection: Check network connectivity to the Neo4j server and verify credentials.
  • Neo4j session is not available: This indicates an internal error creating or maintaining the session; retry or check Neo4j server status.
  • No update parameters provided: The node logs a warning and returns current data without changes. Provide at least one field to update.
  • Errors returned from Neo4j are parsed and presented clearly; review error messages for Cypher syntax or constraint violations.

To resolve issues:

  • Verify Neo4j server is running and accessible.
  • Confirm credentials and database name are correct.
  • Provide valid input data for staffId and at least one update field.
  • Enable "Continue On Fail" if partial processing is acceptable when some items fail.

Links and References

Discussion