Example Node

Basic Example Node

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 and assigns it to the myString field of every incoming data item. This node is useful when you want to inject or modify a specific string value across multiple data items in a workflow.

Practical examples:

  • Adding a constant tag or label to all records passing through.
  • Overwriting or setting a default string value for further processing.
  • Testing or debugging workflows by inserting known values into data items.

Properties

Name Meaning
My String The description text. A string value to set on each input item's myString field.

Output

The node outputs the same number of items as it receives, with each item’s JSON data augmented or updated to include the myString property set to the provided input string.

Output structure example:

{
  "json": {
    "myString": "value set by user",
    // ... other original properties remain unchanged
  }
}

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 methods for parameter retrieval and error handling.

Troubleshooting

  • Common issue: If the input data is empty or not properly formatted, the node will still run but simply add the myString property 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 error property. Otherwise, the node throws an error indicating which item caused the failure.
  • Ensure that the input data is valid JSON objects; otherwise, unexpected errors may occur.

Links and References

Discussion