Match Nodes
AI-generatedOverview
This node enables interaction with a Neo4j graph database, specifically allowing users to query and manipulate graph data. The "Match Nodes" operation is designed to find nodes in the Neo4j database that match specified criteria based on labels and properties. This is useful for scenarios where you want to retrieve specific entities from your graph, such as users, products, or any domain-specific nodes, by filtering them according to their labels and property values.
Practical examples include:
- Retrieving all user nodes labeled "User" with an active status.
- Finding nodes with certain tags or categories.
- Limiting the number of matched nodes returned for performance reasons.
Properties
| Name | Meaning |
|---|---|
| Match Labels | Comma-separated list of node labels to filter by. If left empty, matches nodes with any label. |
| Match Properties | JSON object specifying key-value pairs of node properties to match. Values can use n8n expressions. |
| Return Limit | Maximum number of matching nodes to return (minimum 1). |
| Options | Additional optional settings (currently no options defined). |
Output
The node outputs matched nodes as JSON objects in the json field of each item. Each output item represents one matched node from the Neo4j database, including its properties and metadata. There is no indication of binary data output for this operation.
Dependencies
- Requires connection to a Neo4j graph database.
- Needs an API authentication credential configured in n8n to access the Neo4j instance.
- The node depends on internal routing and operation modules to handle execution logic.
Troubleshooting
- No results returned: Check if the labels and properties specified actually exist in the database. An empty label filter matches any label, but property filters must be accurate.
- Invalid JSON in Match Properties: Ensure the JSON syntax is correct and expressions are valid.
- Connection errors: Verify the Neo4j credentials and network connectivity.
- Limit too high: Setting an excessively high limit may impact performance; try reducing it.