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 where this node is useful include:

  • Adding a constant or user-defined label or tag to all items passing through a workflow.
  • Overwriting or setting a specific string property uniformly across multiple data items.
  • Preparing or normalizing data by injecting a fixed string value before further processing.

For example, if you want to mark all records with a status like "Processed" or add a note to each item, this node can do that simply by setting the myString property accordingly.

Properties

Name Meaning
My String The string value to set on each item's myString field. This value will be added or overwrite the existing one.

Output

The output consists of the same number of items as the input. Each output item contains a JSON object with the original data plus a new or updated property:

  • myString: A string field set to the value provided in the node's input property.

No binary data is produced by this node.

Example output JSON for one item might look like:

{
  "myString": "Placeholder value",
  // ... other original fields
}

Dependencies

  • No external services or API keys are required.
  • This node operates purely on the data passed into it within the n8n workflow environment.

Troubleshooting

  • Empty or missing myString value: If the input property is left empty, the node will set the myString field to an empty string, which may not be intended. Ensure the property is filled correctly.
  • Errors during execution: If an error occurs on a particular item, the node either stops execution or continues based on the "Continue On Fail" setting. Errors include invalid parameter retrieval or unexpected data structures.
  • Data type issues: Since the node expects a string input, providing non-string values (if possible) could cause unexpected behavior.

Links and References

Discussion