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.

Common scenarios for this node 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 demonstrating how to manipulate item data within n8n workflows.

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

Properties

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

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 containing the string provided via the input property.

Output structure example for one item:

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

No binary data output is produced by this node.

Dependencies

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

Troubleshooting

  • Empty or missing myString value: If the input string is empty, the node will still set the myString property to an empty string, which might not be intended. Ensure the input string is correctly provided.
  • Errors during execution: If an error occurs while processing an item, and the node is configured to continue on failure, the error details will be attached to the output item. Otherwise, the node will throw an error indicating the item index where the failure happened.
  • Incorrect property name usage: Make sure the property name myString matches exactly when referencing it downstream in the workflow.

Links and References

Discussion