Restore Earlier Changes
Restore a saved state to recover an earlier workflow definition in development. Until you publish again, live triggers and agent tools keep the previous release. Owner Test tools use the restored definition immediately. The agent’s own draft and published version stay unchanged. Restore creates a new state. It cannot undo record writes, provider actions, or whole-workflow deletion.
For Invoice intake, recover a field removed from Check invoice, then test before publishing.
Save a checkpoint you can recognize
Section titled “Save a checkpoint you can recognize”In the app: open Workflows → Invoice intake → Dev → Version history. Choose the save icon beside Current version, enter Before invoice schema changes as the Version Name in Save new version, and choose Save. If you’re recovering an existing mistake, save Before recovery first.
With an assistant: call workflow_list to find Invoice intake’s ID.
{ "limit": 100 }Note Invoice intake’s id in data.items as <workflowId>. While data.hasMore is true, absence from this list does not prove a workflow is missing. Obtain missing IDs from the app or owner. The calls below use the default development version: always provide workflowId and omit version.
Save your checkpoint with workflow_state_save, then list its history with workflow_history and { "workflowId": "<workflowId>" }.
{ "workflowId": "<workflowId>", "name": "Before invoice schema changes" }Keep data.headStateId from the save response as the checkpoint ID.
Choose a state, not a history group
Section titled “Choose a state, not a history group”In the app: expand an editing group and select an individual state to preview it.
With an assistant: look in data.history for type: "single" rows with id, or type: "group" rows with groupId. A group ID cannot be restored. Note the relevant <groupId> and expand it with workflow_history to list individual states.
{ "workflowId": "<workflowId>", "group": "<groupId>" }Use an individual data.history row’s id as <workflowVersionStateId> to inspect that state’s definition with workflow_document_get.
{ "workflowId": "<workflowId>", "stateId": "<workflowVersionStateId>" }Check flows, inputs, outputs, schema fields, connection bindings, and triggers before choosing.
You can list and restore states within separate limits. Each cutoff is server-local midnight the stated number of calendar dates before the request. States created exactly at that cutoff are included.
| Plan | Listing cutoff | Restore cutoff |
|---|---|---|
| Free | None | 7 dates ago |
| Starter / Pro | 90 dates ago | 90 dates ago |
| Max / custom | None | None |
Restoring a visible state can fail with This workflow version is outside your plan version history limit. It must also exist and belong to the target version.
Recover the development definition
Section titled “Recover the development definition”When you restore, the entire development definition is replaced. Later flows, nodes, expressions, triggers, and schemas disappear. Omitted collections become inactive. Their rows remain stored. When schemas return, they expose retained values, including changes made since the checkpoint. Restoring amount cannot change a stored 1500 back to 120.
Saved connection IDs also return. Restore cannot recreate or reauthorize invalid connections. Check restored accounts and destinations before testing. Triggers return to their saved settings for enablement and permission to receive development events. If a source is still attached, its next real event can immediately run development without publication.
In the app: select the state’s restore icon and confirm Restore in Restore previous workflow version? Current version and Live history have no restore icon. If you have unsaved edits, the first saved state remains restorable. Unless permission is intentional, open each restored trigger and turn Allow test events in dev mode Off.
With an assistant: restore the state with workflow_state_restore, then immediately audit triggers with trigger_audit and { "workflowId": "<workflowId>" } to check their permissions.
{ "workflowId": "<workflowId>", "stateId": "<workflowVersionStateId>" }Check data.restoredFrom in the restore response and retain data.headStateId. Inspect data.items[].deployment.allowTestEvents. For each unintended permission, use its triggerId as <triggerId> to turn it off with trigger_test_events_set.
{ "workflowId": "<workflowId>", "triggerId": "<triggerId>", "allowed": false }If restore fails or times out, inspect status and history before retrying. Schema synchronization can fail after the new state exists. Repeating restore adds another state. Review the current definition’s status, history, and outline, and check its validity with workflow_status, workflow_history, workflow_outline and workflow_validate, each called with:
{ "workflowId": "<workflowId>" }Test the affected path before publishing
Section titled “Test the affected path before publishing”In the app: open restored Check invoice in Dev, then choose Test (tooltip: “Test current flow”). The example uses the rule Amount > 1000: expect INV-104 / 120 to return review_needed:false and INV-105 / 1500 to return review_needed:true.
With an assistant: note Check invoice’s id in the restored outline’s data.flows as <flowId>. Inspect the flow with flow_get, then its inputs with run_inputs, using that same value as nodeIdOrFlowId.
{ "workflowId": "<workflowId>", "flowId": "<flowId>" }{ "workflowId": "<workflowId>", "nodeIdOrFlowId": "<flowId>", "flow": true }Development tests perform real configured writes and provider actions. Verify destinations first. If the labels match, run both fixtures with run_flow, one call each, to check their results.
{ "workflowId": "<workflowId>", "flowId": "<flowId>", "target": "dev", "inputs": { "Invoice ID": "INV-104", "Amount": 120 } }{ "workflowId": "<workflowId>", "flowId": "<flowId>", "target": "dev", "inputs": { "Invoice ID": "INV-105", "Amount": 1500 } }Expect INV-104 / 120 to return review_needed:false and INV-105 / 1500 to return review_needed:true.
For Store invoice, also read development rows. A pure check does not prove storage. Follow Test a Workflow for execution evidence, then Publish a Workflow to make the recovered definition live.