Skip to main content
MindStudio
Pricing
Blog About
My Workspace
Workflow Logic

Check for Changes

The Check for Changes block compares a current input value against a previously stored version of that value, then routes workflow execution down one of two paths depending on whether a change was detected.

Route workflows based on detected input changes

The Check for Changes block compares a current input value against a previously stored version of that value, then routes workflow execution down one of two paths depending on whether a change was detected. It accepts a variable template as its primary input and persists the previous value across runs using internal state keyed to the step. On the first run, when no prior state exists, the block treats the value as changed by default.

The block supports two comparison modes. The default comparison mode uses strict string inequality to determine whether the current value differs from the stored one. The AI mode uses a language model to evaluate whether a meaningful change has occurred, guided by an optional prompt you provide that defines what counts as significant. AI mode accepts optional model settings to control which model is used. You can also specify a variable name to capture the previous value for use elsewhere in the workflow.

The block outputs four fields: a boolean indicating whether a change was detected, the resolved current value, the stored previous value from the last run, and a flag indicating whether this is the first run. Routing is handled through step or workflow transition fields for both the changed and unchanged outcomes, making this block well-suited for polling workflows, scheduled monitoring tasks, and any automation that needs to react only when something new has occurred.

What you can build

Real-world workflows powered by the Check for Changes block.

Monitor Website Content

Periodically fetch a web page and use the block to detect when its content has changed, triggering a notification or downstream action only when an update occurs.

Track Price Fluctuations

Compare a product price retrieved from an API against its last recorded value, routing to an alert step only when the price has shifted.

Alert on New Records

Check a database query result against its previous state to identify when new rows or entries have been added since the last workflow run.

Detect Document Edits

Compare the current version of a document or file against the stored snapshot to trigger a review or approval workflow when edits are made.

Poll API for Updates

Run a scheduled workflow that calls an external API and only continues processing when the response differs from the previously stored output.

Semantic Change Detection

Use AI mode with a custom prompt to determine whether a news summary or report has changed in a meaningful way, ignoring minor wording differences.

Ready to add Check for Changes to your workflow?

Get Started Free

Common questions about Check for Changes

What parameters are required to configure this block?

The only required parameter is 'input', which is a variable template representing the current value to evaluate. The 'mode' field defaults to 'comparison' if not specified. Transition fields for changed and unchanged paths are optional but needed to control routing. The 'prompt' and 'modelOverride' fields are only relevant when using AI mode.

What does the block return as output?

The block outputs four fields: 'hasChanged' (a boolean indicating whether a change was detected), 'currentValue' (the resolved input value for this run), 'previousValue' (the stored value from the last run, or an empty string on the first run), and 'isFirstRun' (a boolean that is true when no previous state exists).

What happens on the very first run when there is no stored state?

When no previous value has been stored, 'isFirstRun' is set to true and 'previousValue' is an empty string. The block treats this condition as a change, so execution is routed down the changed path.

What is the difference between comparison mode and AI mode?

Comparison mode uses strict string inequality to determine whether the current value differs from the stored one. AI mode uses a language model to assess whether a meaningful change has occurred, which allows you to define what constitutes significance through the optional 'prompt' field. AI mode incurs standard LLM usage costs.

What kinds of workflows is this block most commonly used in?

This block is well-suited for scheduled or polling workflows where an action should only occur when something new has happened — such as monitoring external APIs, tracking content updates, detecting new database records, or reacting to changes in document state between runs.

Add Check for Changes to your workflow

Build powerful AI workflows with drag-and-drop blocks. No coding required.