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 injecting a specific text value into each item for further processing or routing.
- Simple testing or demonstration purposes where a fixed string needs to be attached to data.
For example, if you want to tag all incoming records with a specific 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. Placeholder shown as "Placeholder value". |
Output
The node outputs the same number of items as it receives, but each item’s JSON data will have a new or updated property called myString containing the string provided by the user.
Output structure example for one item:
{
"json": {
"myString": "User provided string"
// ... other original properties remain unchanged
}
}
No binary data output is produced by this node.
Dependencies
- No external services or API keys are required.
- This node relies solely on internal n8n workflow data manipulation capabilities.
Troubleshooting
- Empty or missing
myStringvalue: If the input string is empty, the node will still set themyStringproperty to an empty string, which might not be intended. Ensure to provide a meaningful string. - Errors during execution: If an error occurs while setting the property, the node either continues processing subsequent items (if configured to continue on fail) or throws an error indicating the item index where the failure happened.
- Input data format: The node expects input items to have JSON data. If input items lack JSON or are malformed, errors may occur.