Test and fix a workflow
Run a test
Section titled “Run a test”Open Test in the workflow editor. It appears once the workflow has been saved.
- Fill in Inputs for this test, or choose Generate sample data.
- Choose Run workflow.
This runs the saved draft directly with the inputs you entered and opens its recorded run. Nothing is published. You need permission to edit the agent and test workflows.
A test is a real run. It can write to connected services like Google Sheets, so use test data.
You can’t run a test while the workflow has unsaved, invalid or conflicting changes. Finish its setup and prepare any worksheets it uses first. If a test cannot start, the Test section explains why. If it starts and a step fails, open the recorded run to see the reason.
Direct testing supports timer waits. Workflows that ask for approval must be tested through the agent, where you can answer the request. Event waits currently have no event delivery service and cannot be tested. Tools that require approval also need agent testing. Choice prompts need a supported conversation channel. These direct tests are refused before any step runs.
Test through the agent
Section titled “Test through the agent”To check whether your agent knows when and how to call the workflow, open Test through the agent. Fill in the inputs and choose Send to agent. The saved draft must be enabled for this agent. See Give an agent access.
Messaging workflows cannot be tested through the agent. Use Run workflow instead. To make a workflow available to an agent, remove its message actions and turn messaging off in Workflow settings.
The test asks your agent to run this workflow with those inputs. Each Send to agent starts a fresh conversation using the saved draft. Reply in the chat composer to continue that conversation if the agent asks a question. To word the first request yourself, open Edit agent message.
Last test conversation says whether the agent called the workflow:
- “The agent requested this workflow.” Each call is listed as an invocation. Open it to see the run.
- “The agent finished this response without invoking this workflow.” Check its display name and input descriptions, or edit the agent message to ask for it directly.
- If the agent fails before calling the workflow, the test explains that no workflow run started. If it fails after calling it, inspect the listed invocation.
If the conversation hasn’t finished loading, choose Check test again.
Inspect a run
Section titled “Inspect a run”Runs of this workflow lists every run, including runs of earlier saved versions. Open one to see:
- the Run inputs supplied to the workflow,
- each step, marked completed, failed or not run,
- what each step received and produced, with View JSON for the raw data,
- the final workflow output.
The full Run ID appears at the top of inspection, including when execution details cannot be loaded. Use it when reporting a problem.
A failed run puts the failed step first and says why. Show steps not run lists the steps the run never reached.
If you’ve edited the workflow since the run, it says Current draft has changed. The run always shows the version that actually ran.
Every run in the project is also in Runs in the project sidebar.
What an error means
Section titled “What an error means”A failed step names an error code. These are the codes a run can show, with what each means:
| Code | What it means |
|---|---|
active_duration_exceeded |
This run used the time used of active time, exceeding the workspace limit of the limit. Waiting for approvals or timers doesn’t count. Shorten slow steps, reduce retries, or ask support about a higher limit. |
cancelled |
This run was cancelled before it finished. |
expression_error |
A rule or template in a step could not be evaluated. Open the step and correct it. |
google_sheets.connection_not_permitted |
This step selects a different Google account from the project. Remove its explicit account to use the project’s effective account. |
google_sheets.invalid_headers |
Add a header row with a unique, non-empty name for each column to use structured row tools. |
google_sheets.worksheet_schema_conflict |
The worksheet’s headers or data conflict with the requested columns. Review the worksheet without overwriting existing cells. |
handler_threw |
A step failed unexpectedly. |
invalid_config |
A step’s settings are not valid for its action. Open the step and correct them. |
iteration_limit |
The run took more steps than any workflow can, and was stopped to protect it. |
no_handler |
The runtime can’t perform this step’s action. |
replace_limit |
A step kept replacing its own action and was stopped to protect the run. |
retry_delay_failed |
The wait before a retry was interrupted, so the step was not retried. |
runtime-workflow.expression.division_by_zero |
A calculation or branch rule divided by zero. The run stopped. |
runtime-workflow.expression.invalid |
A calculation or branch rule couldn’t be read. Open the workflow and correct it. |
runtime-workflow.expression.number_out_of_range |
A calculation or branch rule produced a number too large to store. |
runtime-workflow.expression.type_mismatch |
A calculation or branch rule used incompatible values, such as text with a number or a missing value. |
runtime-workflow.tool_input.value_missing |
A picked or calculated value was missing. Nothing was written. Supply the value, or choose Empty cell to clear the column. |
state_too_large |
Variables and step results exceeded the limit. Keep only the fields the workflow needs. |
TIMEOUT |
A step exceeded its timeout and stopped. Increase the timeout or shorten the work. |
unknown_node |
The run reached a step that isn’t in its workflow. |
unknown_operation |
This step’s operation isn’t available. |
unknown_outcome |
A step returned a result the runtime does not recognize. |
Errors from a formula are explained with examples in the formula reference.
Common fixes
Section titled “Common fixes”- A value is missing. The step picked an input, variable or result that was empty on this run. Make the input required, give it a default, or handle the empty case with a formula.
- A step timed out. Raise Step timeout in the step’s Settings, up to the limit.
- A temporary error. Turn on Enable retry in the step’s Settings.
- The agent didn’t call the workflow. Give it a clear display name and describe its inputs, so the agent knows when to use it. Check it’s enabled for the agent.