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 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 or flag 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 to set on each item’s myString field)

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 called myString, which holds the string value provided via the node’s input property.

If an error occurs during processing of an item and the node is configured to continue on failure, the output will include an item containing the original JSON, an error object describing the failure, and a reference to the paired input item index.

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • This node relies solely on n8n’s internal framework and standard node parameter handling.

Troubleshooting

  • Common issues:

    • If the input data is empty or not structured as expected, the node will still run but simply add the myString property to whatever JSON exists.
    • Errors may occur if the node parameter myString is accessed incorrectly or if the input data is malformed.
  • Error messages:

    • Errors thrown during execution will be wrapped as node operation errors with context about the item index.
    • If "Continue On Fail" is enabled, errors for individual items will not stop the workflow; instead, error details will be included in the output for those items.

Links and References

Discussion