Neo4j Update Service icon

Neo4j Update Service

根據 service_id 更新服務資訊。,serviceId: 要更新的服務 ID (UUID),name: 新的服務名稱 (可選),duration_minutes: 新的服務持續時間(分鐘)(可選),description: 新的服務描述 (可選),price: 新的服務價格(整數,例如分)(可選),bookingMode: 新的服務預約檢查模式 (可選)。

Neo4j Update Service

AI-generated

Overview

This node updates an existing service record in a Neo4j graph database based on the provided service ID. It allows modifying various attributes of the service such as its name, duration, description, price, and booking mode. The node is useful in scenarios where you need to maintain or synchronize service information stored in Neo4j, for example, updating service details in a scheduling or booking system.

Practical examples:

  • Updating the duration and price of a service after a pricing change.
  • Changing the booking mode of a service to reflect new business rules.
  • Correcting or adding descriptions to services for better clarity in a service catalog.

Properties

Name Meaning
Service ID The unique identifier (UUID) of the service to update.
Name New name for the service (optional).
Duration (Minutes) New duration of the service in minutes (optional).
Description New description text for the service (optional).
Price (Integer) New price of the service as an integer (e.g., in cents) (optional).
Options Collection of additional options:
- Booking Mode (UI Setting) The booking check mode for the service. Possible values: Time Only, Staff Only, Resource Only, Staff And Resource (optional).

Output

The output is an array of JSON objects representing the updated service nodes returned from Neo4j. Each object contains all properties of the updated service node under the service key, reflecting the current state after the update.

Example output structure per item:

{
  "service": {
    "service_id": "uuid-string",
    "name": "Updated Service Name",
    "duration_minutes": 60,
    "description": "Updated description",
    "price": 1000,
    "booking_mode": "TimeOnly",
    "updated_at": "2024-06-01T12:00:00Z"
    // other service properties as stored in Neo4j
  }
}

No binary data output is produced by this node.

Dependencies

  • Requires a Neo4j database connection with credentials including host, port, username, password, and optionally database name.
  • Needs the Neo4j driver library to connect and run Cypher queries.
  • Requires proper configuration of the Neo4j API credentials within n8n.

Troubleshooting

  • Missing or incomplete Neo4j credentials: The node will throw an error if any required credential fields (host, port, username, password) are missing or empty. Ensure all fields are correctly filled.
  • Invalid booking mode value: If the booking mode option is set to a value outside the allowed list (TimeOnly, StaffOnly, ResourceOnly, StaffAndResource), the node throws an error specifying valid options.
  • Connection errors: Failure to connect to Neo4j or open a session results in detailed error messages. Verify network connectivity, credentials, and Neo4j server status.
  • Neo4j session not available: This error indicates internal issues with session creation; retry or check Neo4j server logs.
  • Cypher query errors: Errors during query execution are parsed and reported. Check that the service ID exists and input parameters are valid.
  • Continue on Fail: If enabled, the node continues processing subsequent items even if one fails, appending error details to the output.

Links and References

Discussion