Neo4j Find Staff by External ID icon

Neo4j Find Staff by External ID

根據用戶 External ID 查找關聯的員工記錄。,externalId: 用戶的 External ID (UUID),businessId: 如果用戶可能在多個商家任職,可指定商家 ID (UUID) 進行過濾 (可選),limit: Max number of results to return。

Neo4j Find Staff by External ID

AI-generated

Overview

This node queries a Neo4j graph database to find staff records linked to a user identified by their External ID. It is useful in scenarios where you need to retrieve employment or staff details associated with a specific user, especially when users may be employed by multiple businesses.

For example, if you have a system where users can work for different companies, this node allows you to fetch all staff records related to a user’s unique external identifier. Optionally, you can filter the results by a specific business ID to narrow down the staff records to one employer. You can also limit the number of returned results.

Properties

Name Meaning
External ID The unique external identifier (UUID) of the user whose related staff records you want to find.
Business ID (Optional) If the user might be employed by multiple businesses, specify a business ID (UUID) to filter staff records to that particular business.
Limit Maximum number of staff records to return. Must be at least 1. Defaults to 50.

Output

The node outputs an array of JSON objects, each representing a staff record related to the specified user. Each output item contains a staff field with all properties of the matched staff node from Neo4j.

Example structure of one output item’s JSON:

{
  "staff": {
    // All properties of the Staff node as stored in Neo4j,
    // e.g., id, name, role, employment dates, etc.
  }
}

No binary data is produced by this node.

Dependencies

  • Requires a Neo4j database connection.
  • Needs credentials including host, port, username, password, and optionally a database name.
  • The node uses the official Neo4j driver to connect and run Cypher queries.
  • Proper configuration of the Neo4j credentials in n8n is necessary before use.

Troubleshooting

  • Neo4j credentials are not fully configured: Ensure all required fields (host, port, username, password) are correctly set in the node credentials.
  • Failed to establish Neo4j connection: Check network connectivity to the Neo4j server, verify credentials, and confirm the database is running.
  • Neo4j session is not available: This indicates a failure in creating a session; ensure the database name is correct and accessible.
  • Query errors: If the Cypher query fails, the error message will be parsed and shown. Common issues include incorrect property names or invalid UUID formats.
  • To continue processing other items even if some fail, enable the "Continue On Fail" option in the node settings.

Links and References

Discussion