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. This node is useful when you want to annotate or tag data items with a consistent string value or inject a static piece of information into each item passing through a workflow.
Practical examples:
- Adding a fixed label or category name to all records before sending them to another system.
- Injecting a constant identifier or note into each data item for tracking purposes.
- Setting a placeholder or default value in a batch of data items.
Properties
| Name | Meaning |
|---|---|
| My String | The description text; a string value that will be assigned to the myString field of each input item. Placeholder shown as "Placeholder value". |
Output
The node outputs the same number of items as it receives, with each item's JSON data augmented by a new or updated property called myString. The value of this property is the string provided by the user in the node's input parameter.
Output structure example:
{
"json": {
"myString": "user provided string",
// ... other original properties
}
}
No binary data output is produced by this node.
Dependencies
- No external services or API keys are required.
- The node relies solely on n8n's internal framework and standard input/output handling.
Troubleshooting
Common issues:
- If the input data is empty or not properly formatted, the node will simply pass through the data without modification.
- Errors during execution (e.g., invalid parameter types) will cause the node to throw an error unless "Continue On Fail" is enabled.
Error messages:
- Errors related to parameter retrieval or processing will include the index of the failing item.
- To resolve errors, ensure the input data is valid and the "My String" parameter is correctly set as a string.