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 tag or label to all items passing through a workflow.
- Overwriting or setting a specific string property uniformly across multiple data items.
- Simple data enrichment or annotation before further processing.
For example, if you want to mark all records with a status like "Processed" or add a note such as "Reviewed by Team A", this node can do that easily.
Properties
| Name | Meaning |
|---|---|
| My String | The string value to set on each item's myString field. This can be any text the user wants to assign. |
Output
The output consists of the same number of items as the input, with each item’s JSON data modified to include or update the myString property with the user-provided string.
Output structure example for one item:
{
"json": {
"myString": "User provided string value",
// ... other original properties remain unchanged
}
}
No binary data 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
- Empty or missing input: If no input data is provided, the node will simply return an empty array.
- Invalid input types: Since the node expects input items with JSON data, non-JSON inputs may cause unexpected behavior.
- Error handling: If an error occurs during processing an item, and the node is configured to continue on failure, it will append an error object alongside the problematic item. Otherwise, it will throw an error stopping execution.
- Common error message: Errors related to parameter retrieval or invalid data will indicate the item index causing the issue, helping to identify problematic input.