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; a string value that will be set on each item's myString field. Placeholder shown as "Placeholder value".

Output

The node outputs the same number of items as it receives, with each item’s JSON data modified to include or overwrite the myString property with the user-provided string value.

Output structure example:

{
  "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 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 during execution typically relate to invalid input data or unexpected exceptions.
  • Error messages:

    • If an error occurs on a specific item, and "Continue On Fail" is enabled, the node will append an error object to the output for that item instead of stopping the workflow.
    • Without "Continue On Fail," errors will halt execution and provide context about the failing item index.

Links and References

Discussion