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. It takes an input array of data items and sets the myString field in the JSON part of each item to a user-defined string value. This node is useful when you want to inject or modify a specific string property across multiple data items in a workflow.

Practical examples:

  • Adding a constant tag or label to all incoming data items.
  • Overwriting or setting a descriptive field before passing data to another node.
  • Testing workflows by inserting placeholder text into data items.

Properties

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

Output

The node outputs the same number of items as it receives. Each output item contains the original data with the addition or update of the myString property inside the json object. For example:

{
  "json": {
    "myString": "User provided string value",
    "...": "original properties"
  }
}

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • The node relies solely on n8n's internal methods for parameter retrieval and error handling.

Troubleshooting

  • Common issues:

    • If the input data is empty or not properly formatted, the node will simply pass through the data without modification.
    • Errors during execution (e.g., invalid parameter types) will either cause the node to fail or continue based on the "Continue On Fail" setting.
  • Error messages:

    • Errors thrown will include the index of the item causing the issue.
    • To resolve errors, ensure that the "My String" property is correctly set as a string and that input data items are valid JSON objects.

Links and References

Discussion