Overview
This node, named "Example Node," is a basic transformation node designed to add or overwrite a string property in each input item’s JSON data. It takes an input string from the user and sets this string as the value of the myString field on every incoming data item.
Common scenarios for this node include:
- Adding a static or user-defined string to all items passing through a workflow.
- Overwriting or setting a specific field with a constant value for downstream processing.
- Simple testing or demonstration purposes where you want to inject a known string into the data stream.
For example, if you want to tag all incoming data items with a label or note, you can use this node to set that label uniformly.
Properties
| Name | Meaning |
|---|---|
| My String | The description text; a string value to assign to the myString field in each item's JSON data. |
Output
The node outputs the same number of items as it receives. Each output item contains the original JSON data with an added or updated property:
{
"myString": "<value provided by user>"
}
No binary data is produced by this node.
Dependencies
- No external services or API keys are required.
- This node relies solely on n8n's internal framework and standard node execution environment.
Troubleshooting
- Error Handling: If an error occurs while setting the property on any item, the node will either continue processing other items (if configured to continue on fail) or throw an error indicating the item index where the failure happened.
- Common Issues:
- Providing an invalid type for the "My String" property (e.g., non-string) might cause unexpected behavior.
- If no input data is provided, the node will simply output an empty array.
- To resolve errors, ensure the input data is valid and the "My String" property is correctly set as a string.