Example Node

Basic Example Node

Overview

This node, named "Example Node," is a basic transformation tool designed to add or overwrite a string property in each input item’s JSON data. It takes an input string from the user and assigns it to a field called myString on every incoming data item. This node is useful when you want to annotate or tag your data with a custom string value for further processing or filtering downstream.

Practical examples:

  • Adding a status label or category to each record before sending it to another system.
  • Injecting a constant identifier or note into all items passing through a workflow.
  • Testing or debugging by appending a known string to data items.

Properties

Name Meaning
My String A user-defined string value that will be added to each item's JSON under the key myString.

Output

The output consists of the same array of items as the input, but each item’s JSON object is augmented with a new or updated property:

{
  "myString": "user provided string"
}

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

  • Common issues:

    • If the input data is empty or not properly formatted, the node will still run but simply add the string to whatever JSON exists.
    • Errors during execution will either stop the workflow or, if "Continue On Fail" is enabled, append error information to the output.
  • Error messages:

    • Errors thrown will include context about which item caused the failure.
    • To resolve errors, ensure the input data is valid JSON and the "My String" parameter is correctly set.

Links and References

Discussion