Overview
This node, named "Example Node," is a basic example node designed to demonstrate simple data transformation within an n8n workflow. It processes each input item by adding or updating a JSON property with a user-provided string value. This node is beneficial for scenarios where you want to inject or modify a specific string field in the data passing through your workflow, such as tagging items with a custom label or adding metadata.
Practical example:
You have a list of records flowing through your workflow and want to add a custom note or identifier to each record. By setting the "My String" property, this node will append that string to each item's JSON under the key myString.
Properties
| Name | Meaning |
|---|---|
| My String | A string value to be added to each input item's JSON under the key myString. The user can enter any text here; it defaults to an empty string. |
Output
The node outputs the same number of items as it receives. Each output item contains the original JSON data with an additional or updated property:
myString: The string value provided by the user in the "My String" property.
No binary data is produced by this node.
Dependencies
- No external services or API keys are required.
- This node operates purely on the input data and user-provided parameters within the n8n environment.
Troubleshooting
- Common issue: If the input data is empty or not structured as expected, the node will still run but simply add the
myStringproperty to whatever JSON exists. - Error handling: If an error occurs during processing an item, and the node is configured to continue on failure, the error details will be attached to the output item. Otherwise, the node will throw an error indicating which item caused the failure.
- Resolution: Ensure that the input data is valid JSON objects and that the "My String" property is set correctly.