Create Node
AI-generatedOverview
This node integrates with a Neo4j graph database, allowing users to create new nodes within the graph. It is particularly useful for scenarios where you want to programmatically add entities (nodes) with specific labels and properties into your Neo4j database. For example, you might use this node to add new "Person" or "Customer" nodes with associated details like name, email, and creation date.
Properties
| Name | Meaning |
|---|---|
| Labels | Comma-separated list of labels to assign to the new node (e.g., Person, User). |
| Properties | JSON object defining the properties of the new node. Values can include n8n expressions. |
| Options | Collection of additional options: |
| Return Data | Boolean indicating whether to return the created node's element ID and properties. |
Output
The node outputs JSON data representing the newly created node in the Neo4j database. This includes at least the element ID and the properties of the node if the "Return Data" option is enabled. The output structure allows downstream nodes to access the created node's details for further processing.
No binary data output is produced by this node.
Dependencies
- Requires connection to a Neo4j graph database.
- Needs an API key credential or equivalent authentication token configured in n8n to authorize requests to the Neo4j instance.
- The node depends on internal routing and operation modules to handle the execution logic.
Troubleshooting
- Common Issues:
- Incorrect or missing labels may cause the node creation to fail or create unintended nodes.
- Malformed JSON in the Properties field can lead to errors parsing the input.
- Authentication failures due to invalid or missing credentials will prevent node creation.
- Error Messages:
- Errors related to authentication typically indicate issues with the provided API key or connection settings.
- JSON parsing errors suggest that the Properties input is not valid JSON or contains invalid expressions.
- Resolutions:
- Verify that labels are correctly formatted as comma-separated strings without extra spaces.
- Use the n8n expression editor to validate JSON property inputs.
- Ensure the Neo4j credentials are correctly set up and have sufficient permissions.