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 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. This is the string value that will be set on each item's myString field. Users can enter any text here; it defaults to empty.

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.

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.
  • The node relies solely on n8n's internal workflow data 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 input data is malformed or if the node parameter retrieval fails.
  • Error messages:

    • If an error occurs during execution, the node either continues processing subsequent items (if configured to continue on fail) or throws an error indicating the item index where the failure happened.
    • To resolve errors, ensure that input data is valid JSON and that the "My String" property is properly set.

Links and References

Discussion