Example Node

Basic Example Node

Overview

This node, named "Example Node," is a basic example transformation node designed to process input data items by adding or modifying a string property on each item. It iterates over all incoming data items and sets a specific string value on each item's JSON data. This kind of node is useful for simple data enrichment or tagging scenarios where you want to add a constant or parameterized string to every item passing through the workflow.

Practical examples include:

  • Adding a timestamp or label to each data item.
  • Tagging data with a user-defined string for later filtering or processing.
  • Simple data normalization by injecting a fixed string property.

Properties

Name Meaning
Arya Time The description text (string).

Note: Although the code references a parameter named "myString" internally, based on the provided properties definition, the relevant input property exposed to users is "Arya Time", which is a string input with a placeholder "Placeholder value".

Output

The node outputs an array of data items identical in length to the input. Each output item contains a json object that includes the original data plus the added or modified string property (intended to be set from the input parameter). If an error occurs during processing of an item and the node is configured to continue on failure, the output item will include an error field describing the issue along with the original item data.

No binary data output is produced by this node.

Dependencies

  • No external services or API keys are required.
  • The node depends only on the n8n core framework and its standard workflow utilities.

Troubleshooting

  • Common Issue: The internal parameter name used in the code (myString) does not match the exposed property name (aryaTime). This mismatch can cause the node to not behave as expected if the parameter retrieval uses the wrong name.

    Resolution: Ensure that the parameter name used in the code matches the property name defined in the node's properties. In this case, update the code to retrieve "aryaTime" instead of "myString".

  • Error Handling: If an error occurs while processing an item, and the node is not set to continue on failure, the execution will stop and throw an error indicating the item index. To handle errors gracefully, enable the "Continue On Fail" option.

Links and References

Discussion