Neo4J Query¶
Executes a Cypher query against a Neo4J database and returns both a human-readable summary and the raw JSON results. It accepts optional query parameters in JSON format and uses stored credentials to connect.

Usage¶
Use this node when you need to read or analyze graph data from a Neo4J instance using Cypher. Typical workflow: provide a credentials file, set a timeout, write your Cypher query, optionally supply parameters as JSON, and connect the outputs to downstream nodes for analysis or display.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | Not specified | Path or reference to the saved credentials for the Neo4J service. Must match the 'neo4j' credential template. | |
| timeout | False | Not specified | Maximum time (in seconds) to wait for the query to complete before timing out. | 60 |
| cypher_query | True | STRING | The Cypher query to execute. | MATCH (p:Person)-[r:KNOWS]->(q:Person) RETURN p.name, q.name LIMIT 25 |
| parameters | False | STRING | JSON object containing named parameters for the Cypher query. | {"name": "Alice", "limit": 10} |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | Human-readable summary or status message for the executed query. | Neo4J Query Results |
| json | JSON | Raw JSON payload returned from the service containing query results. | {"results": [{"p.name": "Alice", "q.name": "Bob"}]} |
Important Notes¶
- Parameters must be valid JSON: If the parameters string is not valid JSON, the node logs a warning and proceeds with an empty parameter object.
- Credentials required: The node uses the 'neo4j' credential template; ensure your credentials file matches this template.
- Timeout behavior: Long-running queries may be interrupted if they exceed the specified timeout.
- Read-only behavior: This node is intended for read (query) operations. Use a separate write node for creating or modifying graph data.
- Category: Listed under the 'Neo4J' category in the Salt menu.
Troubleshooting¶
- Invalid JSON in parameters: Ensure 'parameters' is a properly formatted JSON string (e.g., '{"key": "value"}'). If invalid, the node will run with empty parameters.
- Connection failures: Verify the credentials_path points to a valid Neo4J credential set and that the database is reachable from your environment.
- Query errors: Syntax or runtime errors in the Cypher query will cause the request to fail. Test the query in a Cypher console and correct any issues.
- Timeouts: Increase 'timeout' for complex queries or optimize the Cypher query to reduce execution time.