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 where this node is useful include:
- Adding a constant or user-defined string value to all items passing through a workflow.
- Overwriting or initializing a specific field in the data for downstream processing.
- Simple data enrichment or tagging with static text.
For example, if you want to tag all records with a status label like "Processed" or add a note to each item, this node can do that by setting the myString property accordingly.
Properties
| Name | Meaning |
|---|---|
| My String | The string value to set on each item's myString field. This value will be added or overwrite the existing value in the output 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 containing the string provided via the input property.
Output structure example for one item:
{
"json": {
"myString": "User provided string value",
// ... other original properties remain unchanged
}
}
No binary data is produced or handled 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
- Empty or missing input string: If the input string property is left empty, the node will set the
myStringfield to an empty string, which might not be intended. Ensure the input string is correctly set. - Error handling: If an error occurs during execution (unlikely given the simple logic), the node supports continuing on failure if enabled; otherwise, it throws an error indicating the item index where the failure happened.
- Data type assumptions: The node assumes input data items are objects with a JSON property. Supplying non-standard data structures may cause unexpected behavior.