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 and sets it as the value of the myString field on every incoming item. This node is useful for simple data enrichment or tagging scenarios where you want to annotate each item with a specific string value.

Practical examples:

  • Adding a constant label or tag to all items passing through a workflow.
  • Injecting a user-defined note or comment into each data record.
  • Setting a placeholder or default string value before further processing.

Properties

Name Meaning
My String The description text; any string value to assign to the myString field in each item's JSON data.

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 set to the value provided in the input property.

Output structure example:

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

No binary data output is produced by this node.

Dependencies

  • No external services or API keys are required.
  • No special environment variables or n8n configurations are needed.

Troubleshooting

  • Common issues:

    • If the input data is empty or not properly formatted, the node will simply pass through without modification.
    • Errors during execution typically relate to invalid input types or unexpected data structures.
  • 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 that item under an error property.
    • Otherwise, the node throws an error indicating the item index where the failure happened.

Links and References

Discussion