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 constant or user-defined string value to all items passing through a workflow.
- Overwriting or initializing a specific field with a fixed string for downstream processing.
- Simple testing or demonstration purposes where you want to inject a static 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, but each item’s JSON data will have a new or updated property called myString set to the user-provided string.
Output structure per 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 n8n's internal framework and standard node execution environment.
Troubleshooting
- Empty or missing
myStringvalue: If the input string is left empty, the node will set themyStringproperty to an empty string, which might not be intended. Ensure the property is filled correctly. - Errors during execution: If an error occurs while setting the property, the node either continues processing subsequent items (if configured to continue on failure) or throws an error indicating the item index where the failure happened.
- Data type issues: Since the node expects a string input, providing non-string values may cause unexpected results or errors.