Example Node
AI-generatedOverview
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 your data items with a consistent string value or inject a static piece of information into each item for further processing.
Practical examples:
- Adding a fixed label or category name to all incoming records.
- Injecting a constant configuration value or identifier into each data item before passing it downstream.
- Testing workflows by appending a known string to verify data flow.
Properties
| Name | Meaning |
|---|---|
| My String | The description text; a string value that will be set on each item's myString field. |
Output
The node outputs the same number of items as it receives. Each output item contains the original JSON data plus a new or overwritten property called myString set to the user-defined string value.
Output structure example:
{
"json": {
"...original properties...",
"myString": "user provided string"
}
}
No binary data is produced by this node.
Dependencies
- No external services or API keys are required.
- This node depends only on the n8n workflow environment and its standard node execution context.
Troubleshooting
- Common issue: If the input data is empty or not properly formatted, the node will still run but simply add the
myStringproperty to whatever JSON exists. - Error handling: If an error occurs during processing an item, and the node is configured to continue on failure, the error details will be attached to the output item under an
errorproperty. - Typical errors: Errors might arise if the input data is malformed or if there is an unexpected runtime issue. These errors include the item index for easier debugging.