Example Node

Basic Example Node

Example Node

AI-generated

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 data items with a specific string value or inject static text into your workflow data.

Practical examples:

  • Adding a fixed label or category name to all incoming records.
  • Injecting a constant string for downstream processing or filtering.
  • Testing workflows by appending a known string to data items.

Properties

Name Meaning
My String The description text. A user-defined string that will be set on each item's myString field.

Output

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

Output structure example:

{
  "json": {
    "myString": "User provided string value",
    // ... 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

  • Common issues:

    • If the input data is empty or not properly formatted, 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 in the workflow.
  • Error messages:

    • If an error occurs on a specific item, and "Continue On Fail" is disabled, the node throws an error indicating the item index.
    • If "Continue On Fail" is enabled, the node appends an error object to the output for the failed item instead of stopping execution.

Links and References

Discussion