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 string from the user and sets this string as the value of the myString field inside the JSON data of every incoming item.

Common scenarios where this node is useful include:

  • Adding a static label or tag to all items passing through a workflow.
  • Overwriting or setting a specific string property uniformly across multiple data items.
  • Testing or debugging workflows by injecting known values into the data stream.

For example, if you want to mark all records with a status like "Processed" or add a note "Checked by QA", you can use this node to set that string on each item.

Properties

Name Meaning
My String The string value to set on each item's myString field. This can be any text the user wants to assign.

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:

{
  "myString": "value set by user"
}

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • This node relies solely on n8n's internal framework for execution.

Troubleshooting

  • Error when setting the string: If the node throws an error related to setting the parameter, ensure that the input data is valid JSON and that the property name is correctly specified.
  • Continue On Fail behavior: If enabled, the node will continue processing remaining items even if one fails, appending error details to the output. Otherwise, it stops at the first error.
  • Empty string input: Providing an empty string will overwrite the myString field with an empty value, which might not be intended.

Links and References

Discussion