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 to all items passing through a workflow.
- Overwriting or initializing a specific field with a fixed value before further 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 records with a status label like "Processed" or add a note to each item, this node can be used to set that string uniformly.
Properties
| Name | Meaning |
|---|---|
| My String | The description text; any string value to assign to the myString field in each item's JSON data. |
Output
The output consists of the same number of items as the input. Each item’s JSON data will have a new or updated property called myString set to the value provided by the user.
Output structure example (for one item):
{
"myString": "User provided string"
}
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 within the n8n workflow environment.
Troubleshooting
- Error Handling: If an error occurs while setting the property on an item, the node either continues processing subsequent items (if configured to continue on failure) or throws an error indicating which item caused the problem.
- Common Issues:
- Providing non-string values or unexpected input types might cause errors or unexpected results.
- Ensure that the input data is properly formatted JSON objects; otherwise, the node may fail to set the property correctly.