Neo4j Get Business Hours icon

Neo4j Get Business Hours

獲取指定商家的營業時間列表。,businessId: 要獲取營業時間的商家 ID (UUID)

Neo4j Get Business Hours

AI-generated

Overview

This node retrieves the business hours for a specified business from a Neo4j graph database. It is designed to query the database for a business entity identified by its unique ID and return the associated opening and closing times for each day of the week.

Common scenarios where this node is beneficial include:

  • Integrating business hours data into workflows that require scheduling or availability checks.
  • Automating updates or notifications based on business operating times.
  • Aggregating or displaying business hours information in applications or dashboards.

For example, a user can input a business ID to fetch its weekly schedule, which can then be used to determine if the business is currently open or to plan appointments accordingly.

Properties

Name Meaning
Business ID The unique identifier (UUID) of the business whose operating hours you want to retrieve.

Output

The node outputs an array of JSON objects, each representing the business hours for a specific day of the week. Each object contains:

  • day_of_week: Numeric representation of the day (e.g., 1 for Monday).
  • start_time: Opening time formatted as "HH:mm" (24-hour format, UTC assumed).
  • end_time: Closing time formatted as "HH:mm" (24-hour format, UTC assumed).

Example output item:

{
  "businessHour": {
    "day_of_week": 1,
    "start_time": "09:00",
    "end_time": "17:00"
  }
}

The node does not output binary data.

Dependencies

  • Requires a Neo4j database connection with appropriate credentials (host, port, username, password, and optionally database name).
  • Uses the Neo4j driver library to connect and run Cypher queries.
  • The Neo4j instance must have the APOC plugin installed for temporal formatting functions (apoc.temporal.format).
  • The node expects a credential configuration containing the necessary connection details and authentication for Neo4j.

Troubleshooting

  • Neo4j Credentials Not Fully Configured: If any required credential fields are missing (host, port, username, or password), the node will throw an error indicating incomplete configuration. Ensure all fields are correctly filled.
  • Failed to Establish Neo4j Connection: This error occurs if the node cannot connect to the Neo4j server. Verify network connectivity, correct host and port, and valid credentials.
  • Neo4j Session Not Available: Indicates an internal failure to create a session; retry or check the Neo4j server status.
  • Cypher Query Errors: If the query fails (e.g., due to missing nodes or incorrect property names), the node may throw errors parsed from Neo4j. Check that the business ID exists and the database schema matches expectations.
  • Multiple Items Warning: When processing multiple input items, the node logs a warning that it will fetch hours for each business ID separately. This is informational but indicates batch processing behavior.

To resolve errors:

  • Double-check Neo4j credentials and connectivity.
  • Confirm the business ID exists in the database.
  • Ensure the APOC plugin is installed and enabled in Neo4j.
  • Use the node's "Continue On Fail" option to handle individual item errors gracefully.

Links and References

Discussion