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 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 data item.
  • Injecting a constant string value into all items before sending them to another system.
  • Marking data items with a specific identifier or note for tracking purposes.

Properties

Name Meaning
My String The description text. A string value that will be assigned to the myString field of each input item's JSON data.

Output

The output consists of the same number of items as the input. Each output item contains the original JSON data with an added or overwritten property:

{
  "myString": "user provided string"
}

If the node encounters an error on any item and is configured to continue on failure, the output item for that input will include an error field describing the issue alongside the original JSON data.

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • This node operates purely on the input data within n8n workflows.

Troubleshooting

  • Common issues:

    • If the input data is empty or not structured as expected, the node may throw errors when trying to assign the string.
    • Errors during execution will either stop the workflow or, if "Continue On Fail" is enabled, will attach error details to the respective item.
  • Error messages:

    • Errors related to invalid input data structure will indicate the item index causing the problem.
    • To resolve errors, ensure input data is valid JSON and properly formatted.

Links and References

Discussion