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 label or tag to all items passing through a workflow.
- Overwriting or setting a specific string property uniformly across multiple data items.
- Testing or demonstrating how to manipulate item data within n8n workflows.
For example, if you want to mark all records with a status like "Processed" or add a note "Checked by QA", this node can be used to set that string on each item.
Properties
| Name | Meaning |
|---|---|
| My String | The string value to assign to the myString field on each input item. This can be any text the user wants to set. |
Output
The output consists of the same number of items as the input. Each output item contains the original JSON data with an added or updated property:
{
"myString": "<value provided in the node parameter>"
}
No binary data is produced by this node.
If an error occurs during processing an item and the node is configured to continue on failure, the output item will include an error field describing the issue alongside the original JSON.
Dependencies
- No external services or API keys are required.
- This node operates purely on the input data it receives within the workflow.
Troubleshooting
- Error Handling: If an error occurs while setting the string on an item, and the node is not set to continue on failure, the execution will stop and throw an error indicating which item caused the problem.
- Empty Input: If no input data is provided, the node will simply return an empty array.
- Incorrect Property Usage: Ensure the input property "My String" is properly set; otherwise, the
myStringfield will be set to an empty string.