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 with a custom string, for example, adding a label, note, or identifier to each item passing through a workflow.

Practical examples:

  • Adding a status label like "processed" or "pending" to each data item.
  • Injecting a fixed comment or remark into all items before further processing.
  • Setting a placeholder or default value that downstream nodes can use.

Properties

Name Meaning
My String The description text; any string value to set on each item's myString field.

Output

The output consists of the same number of items as the input. Each output item contains the original JSON data with an added or overwritten property called myString, which holds the string value provided by the user.

Example output JSON structure per item:

{
  "myString": "User provided string",
  // ... other original properties
}

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • This node relies solely on internal n8n workflow data manipulation.

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 in the workflow.
  • Error messages:

    • If an error occurs on a specific item, and the node is configured to continue on failure, the error details will be attached to the output item under an error property.
    • Otherwise, the node throws an error indicating the item index where the failure happened.

To resolve errors:

  • Ensure input data is valid JSON objects.
  • Use the "Continue On Fail" option if partial processing is acceptable.

Links and References

Discussion