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 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 verify data flow.

Properties

Name Meaning
My String The description text; a string value that will be assigned to the myString field of each input item.

Output

The output consists of the same number of items as the input. Each item's JSON data will have a new or updated property named myString set to the value provided in the node's input property.

No binary data is produced by this node.

Example output JSON structure per item:

{
  "myString": "value set by user",
  // ... other original properties remain unchanged
}

Dependencies

  • No external services or API keys are required.
  • This node only depends on the n8n core framework.

Troubleshooting

  • Error handling: If an error occurs while setting the property on any item, the node either continues processing remaining items (if configured to continue on fail) or throws an error indicating the item index where the failure happened.
  • Common issues:
    • Providing an invalid type for the "My String" property (e.g., non-string) might cause unexpected behavior.
    • If no input data is provided, the node will simply output an empty array.
  • To resolve errors, ensure the input data is valid and the "My String" property is correctly set as a string.

Links and References

Discussion