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 or user-defined string to all items passing through a workflow.
  • Overwriting or setting a specific field with a constant value for downstream processing.
  • Simple data enrichment where a fixed label or tag needs to be added to each item.

For example, if you want to tag all incoming records with a status like "Processed" or add a note, you can use this node to set that string uniformly.

Properties

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

Output

The output consists of the same number of items as the input. Each item's JSON data will have a new or updated property called myString containing the string provided by the user.

Example output JSON structure for one item:

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

No binary data is produced by this node.

Dependencies

  • No external services or API keys are required.
  • This node operates purely on the input data within the workflow.

Troubleshooting

  • Error when accessing input data: If the node receives no input items, it may throw errors. Ensure that the previous node outputs data.
  • Invalid property name or missing parameter: The node expects the myString parameter to be defined. If left empty, it will set an empty string.
  • Continue on Fail behavior: If an error occurs during processing an item, the node can either stop execution or continue depending on the "Continue On Fail" setting in n8n. Errors will be attached to the respective item if continuing.

Links and References

Discussion