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.

Common scenarios for this node include:

  • Adding a static or user-defined string to all items passing through a workflow.
  • Overwriting or injecting a specific text value into each item for further processing or tagging.
  • Simple data enrichment where a constant string needs to be appended to each record.

For example, if you want to tag all incoming records with a status message or label, you can use this node to set that label uniformly.

Properties

Name Meaning
My String The string value to assign to the myString field in each item's JSON data. This can be any text entered by the user.

Output

The node outputs the same number of items as it receives, but each item’s JSON data will have a new or updated property called myString containing the string provided via the input property.

Output structure example for one item:

{
  "json": {
    "myString": "User provided string"
    // ... 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 framework and standard input/output handling.

Troubleshooting

  • Empty or missing input string: If the "My String" property is left empty, the node will set the myString field to an empty string, which might not be intended. Ensure the property is filled correctly.
  • Error handling: If an error occurs during processing an item, the node supports continuing on failure if enabled; otherwise, it throws an error indicating the item index causing the issue.
  • Input data format: The node expects input data items to be objects with a json property. Supplying data in an unexpected format may cause errors.

Links and References

Discussion