Has Changed

Detect if something has changed between the current execution and the previous one.

Overview

This node detects if specific data items have changed between the current execution and the previous one. It is useful in workflows where you want to trigger actions only when certain data changes, such as monitoring updates in a feed or dataset. For example, it can compare a specific field or the entire input data to determine if there has been a change since the last run.

Use Case Examples

  1. Monitor a data feed and proceed only if a particular item has changed.
  2. Compare entire input data sets between executions to detect any modifications.

Properties

Name Meaning
Default has changed Defines the default change status when there is no previous execution data available.
Compared Input Specifies the particular item or field in the input data to compare for changes. Defaults to comparing all items.

Output

JSON

  • 0 - Output data when a change is detected (true output).
  • 1 - Output data when no change is detected (false output).

Dependencies

  • Uses 'object-hash' library to generate hashes of input data for comparison.

Troubleshooting

  • Ensure the 'Compared Input' field matches the keys in the input data to avoid false negatives.
  • If the node always outputs 'changed' on first run, this is expected behavior controlled by the 'Default has changed' property.
  • Check that the workflow static data is not cleared between executions, as this stores previous hashes for comparison.

Discussion