Test workflows and read job history
Run a test of any workflow, read each job's step log and output, follow the failure path, rerun a failed job and switch a workflow off, in three ways.
Last updated
Every run of a workflow is a job. Anythink keeps the payload that started it, the status, and for every step that ran its log, output and error. That history is how you test a workflow and how you find out why one failed.
This page shows each task in the Anythink dashboard, with the CLI and with an AI assistant. For the model behind it (triggers, steps, success and failure paths), read How workflows work.
Test a workflow
A test run starts a job straight away, without waiting for the trigger. You choose the payload.
In the Anythink dashboard
- Open the workflow and select Test Workflow, the play icon in the toolbar. On the Workflows list, the play button on the workflow's row does the same.
- Choose an Entity and a Record to use as the trigger data, or edit the Payload JSON directly. A timed workflow has nothing to pick: it runs once, now.
- Select Run Test. The canvas highlights each step as it runs: running, succeeded or failed.
- Select View Job History to see the job in full.
With the CLI
anythink workflows trigger 256 --payload '{"total":150}'
✓ Workflow 256 triggered.
The command returns as soon as the job is queued. It doesn't wait for the steps. To test against a record, add the entity and the record's id:
anythink workflows trigger 256 --entity orders --entity-id 1042 --payload '{"total":150,"status":"paid"}'
--payload is plain JSON, and the CLI sends it as the trigger's data. --entity is required when the workflow has a Manual trigger, and it must be one of that trigger's entities.
With an AI assistant (MCP)
Run workflow 256 with the payload {"total":150}, then show me the job.
The assistant runs workflows trigger 256 --payload '{"total":150}' through the cli tool, then reads the job as described in Read a job.
What a test run does
A test run creates an ordinary job. It uses the type of the workflow's first enabled trigger, so the workflow needs at least one enabled trigger or the call is refused with Workflow has no enabled trigger.
- The payload is yours. The job starts with
{ id, entity_name, data }built from what you sent, and a trigger filter isn't checked. Your steps read it as$anythink.trigger. - Timed workflows run once, immediately. The schedule isn't touched, so the next scheduled run still happens when it was due.
- It needs the right permission. Starting a workflow takes
anythink_workflows:trigger.
Note: Test runs are real runs. Steps write data, call APIs and send email and push notifications, and the job counts against your plan's workflow runs. Test against sample records.
Read a job
Open a job to see exactly what it received, what each step did and why it ended as it did.
In the Anythink dashboard
- Open the workflow, then select View Job History. On the Workflows list, use the history icon on the workflow's row.
- The left pane lists the jobs, newest first, 25 to a page, each with its status. Select one.
- The right pane shows the job's status, an Error box if it failed, and the Payload it started with.
- Under Execution Steps, each step that ran has a Success or Failed badge and two tabs. Logs is what the step did, including resolved queries and request URLs. Data is the output saved for later steps.
- Select Download Logs to save every step's log as a text file.
While a job is running, the page refreshes every two seconds. Select the refresh button on the list to reload it by hand.
With the CLI
anythink workflows jobs 256
This lists the workflow's jobs, newest first, with each job's id and status, and the error message on a failed job. It doesn't print steps. For a job's steps, call the API with fetch and the job's id:
anythink fetch /workflows/256/jobs/133261
{
"status": "Success",
"payload": "{\"id\": 1, \"data\": {\"total\": 20, \"status\": \"new\"}, \"entity_name\": \"orders\"}",
"error_message": "",
"steps": [
{
"success": false,
"error_message": "Condition evaluation failed - no data items matched the specified conditions",
"log": "…",
"data_json": "{\"condition_result\": false, …}",
"workflow_step": { "key": "check_total", "name": "Check total", … }
},
{
"success": true,
"log": "Starting RunScriptAction for step log_low\n…",
"data_json": "{\"data\": [{\"skipped\": true}]}",
"workflow_step": { "key": "log_low", … }
}
]
}
The response carries more fields than shown. The first step failed and the job still ended as Success, because the failure was handled. See Read a failure.
With an AI assistant (MCP)
Show me the latest jobs for workflow 256 and what each step returned.
The assistant runs workflows jobs 256 through the cli tool for the list, then fetch /workflows/256/jobs/<job id> for a job's steps.
Job numbers and job ids
The dashboard numbers a workflow's jobs from 1, oldest first, so Job #3 is the third run of that workflow. The API and the CLI use the job's id, which is unique across the project. To match one to the other, compare the payload and the time.
Job statuses
| Status | Meaning |
|---|---|
Pending |
Queued, not started. |
Running |
The worker is running its steps. current_executing_step_key names the step it is on. |
Success |
The last step it ran succeeded, or a failure was handled by an on failure path. |
Failed |
A step failed with no on failure link, the job hit a limit, or your plan's workflow quota was used up. |
Read a failure
A step fails when its action doesn't complete: a script error, a rejected parameter, a non-2xx response from Call An API, or a Condition that evaluates to false. What happens next depends on whether the step has an on failure link.
| The failed step | The job |
|---|---|
| Has an on failure link | Follows it. If the steps there finish, the job ends Success, and the failed step keeps its Failed badge. |
| Has no on failure link | Ends Failed, with that step's message in Error. |
To find the cause of a Failed job:
- Read the Error box. It is the message from the step that failed.
- Find the step with the Failed badge under Execution Steps. Open its Logs tab for what it did before it stopped, and its Data tab for what it saved.
- Compare the step's inputs with the job's Payload. Most failures are a template that points at a field the payload doesn't have.
For example, a Run Script step that reads a field the payload doesn't carry ends the job like this:
{
"status": "Failed",
"error_message": "Cannot read properties of undefined (reading 'rate')",
"steps": [
{
"success": false,
"error_message": "Cannot read properties of undefined (reading 'rate')",
"log": "Starting RunScriptAction for step read_discount\nPreparing JavaScript engine (Memory: 64MB, Timeout: 30s)\nExecuting script\n",
"data_json": null,
"workflow_step": { "key": "read_discount", … }
}
]
}
A Call An API step that gets a non-2xx response saves the response and status_code in its Data tab. A Condition step saves every comparison it made, with the expected_value and actual_value, so you can see why a branch went the way it did.
Note: A Condition that is false and has no on failure link ends the job as Failed. When "nothing to do" is a normal result, link the false branch to a harmless step.
Why didn't my workflow run?
| Symptom | Check |
|---|---|
| No job appears for an event | The workflow and its trigger are enabled, the event and entity are right, and the trigger filter matches. Events the filter rejects leave no job. |
| A timed workflow never runs | The cron expression is valid and written in UTC. |
| A job failed with a quota message | Your plan's monthly workflow runs are used up. See Limits and quotas. |
| A job failed at a Condition | The condition was false and has no on failure link. Link the false branch. |
A value shows up as {{ … }} in a record or message |
The template path doesn't exist. Check the step key, data[0] and the field names against the step's Data tab. See Template syntax. |
| A step can't find records you can see in the dashboard | Workflow reads aren't limited by row-level security, but filters are exact. Check the filter values in the step's log. |
| Users can't see records a workflow created | Grant access with the row-level security options on the create step. See Groups and row-level security. |
| An integration step fails with "No credentials found" | Connect the service under Settings › Integrations. |
| A job failed with "exceeded maximum step limit" | Your links form a loop. A job stops after 250 step executions. |
| A workflow runs again and again | A step writes to the entity that triggers the workflow. Add a trigger filter so the workflow's own writes don't match. |
Give steps descriptive keys (find_due_orders, not step_2). Keys appear in templates, in logs and in the job's current-step field. In a Run Script step, console.log writes to the step's log, which helps while you build.
Rerun a failed job
Anythink doesn't retry a failed job, and there is no rerun button. To run one again, start the workflow with the same payload. The failed job stays in the history, and the rerun is a new job.
In the Anythink dashboard
- Open the failed job and note the
entity_name,idanddatain its Payload. - Close the history and select Test Workflow.
- Choose the same Entity and Record, or paste the job's
datainto Payload. - Select Run Test.
With the CLI
Map the job's payload onto the three options: entity_name to --entity, id to --entity-id, and data to --payload.
anythink workflows trigger 257 --entity orders --entity-id 2 --payload '{"total":300,"status":"fail"}'
With an AI assistant (MCP)
Run workflow 257 again with the payload from its last failed job, then show me the new job.
The assistant reads the job with fetch /workflows/257/jobs/<job id>, then runs workflows trigger with the same entity, record id and data.
What a rerun repeats
A rerun starts at the start step. Steps that succeeded the first time run again, so a step that created a record creates another. Fix the cause first, then rerun, and check what the earlier steps wrote before you do.
Disable a workflow
A disabled workflow stops reacting to its event and timed triggers. Nothing is deleted, and you can switch it back on at any time.
In the Anythink dashboard
- Open the workflow.
- Select Disable Workflow in the toolbar. The button turns green and reads Enable Workflow.
The Workflows list shows each workflow's status as Enabled or Disabled. Selecting Enable Workflow in the toolbar turns the workflow back on.
With the CLI
Switch a workflow on or off with the API:
anythink fetch /workflows/256/disable --method POST
anythink fetch /workflows/256/enable --method POST
Both return 204 No Content. To create a workflow already switched on, add --enabled to anythink workflows create.
With an AI assistant (MCP)
Disable workflow 256.
The assistant calls POST /workflows/256/disable through fetch. Disabling and enabling take anythink_workflows:update.
Get told when a job fails
Anythink doesn't send an alert when a job fails. Build one with the workflow's own failure path: link the step's on failure handle to a Send an Email or Send a Push Notification step, and the failure reaches you the moment it happens. Because the failure is then handled, the job ends Success and the step keeps its Failed badge, so open the job to see which step failed.
In the Anythink dashboard
- Add a Send an Email step. See Send email from a workflow.
- Drag from the red on failure handle of the step you want to watch to the new step.
- Select Save Workflow.
With the CLI
anythink workflows step-link 257 648 --on-failure 649
257 is the workflow, 648 the step to watch and 649 the step that runs when it fails. Add the email step first with workflows step-add.
With an AI assistant (MCP)
In workflow 257, make step 649 run when step 648 fails.
The assistant runs workflows step-link 257 648 --on-failure 649 through the cli tool.
Jobs from the API
GET /org/{project_id}/workflows/{workflow_id}/jobs?page=1&pageSize=25
GET /org/{project_id}/workflows/{workflow_id}/jobs/{job_id}
Both need anythink_workflows:read. The list is newest first and returns items, page, page_size, total_items, total_pages and the paging flags. Each job has its status, payload, error_message, current_executing_step_key and a steps list with every step's success, log, data_json and error_message. The list includes the steps, so use a small pageSize when you only need statuses.
Permissions
| To | Permission |
|---|---|
| View workflows and job history | anythink_workflows:read |
| Create workflows and add steps | anythink_workflows:create |
| Edit, enable and disable | anythink_workflows:update |
| Delete | anythink_workflows:delete |
| Run a test or start a workflow by API | anythink_workflows:trigger |
Project administrators have all of these. Job history shows what every step received and returned, so give anythink_workflows:read only to people you trust with that data. See Roles and permissions.
Limits
| Limit | Detail |
|---|---|
| Retries | None. A failed step follows its on failure link or ends the job, and a failed job stays failed. |
| Steps per job | 250. A job that runs more fails with a maximum-step-limit message. |
| Runs per month | Set by your plan. A job started after the quota is used up fails with a quota message and isn't counted. |
| Test runs | Real jobs that count against your plan's workflow runs. |
| Job history page | 25 jobs in the dashboard. The API takes page and pageSize. |
| Failure alerts | None built in. Use an on failure path. |
workflows jobs in the CLI |
Shows each job's id, status and error. Use fetch for steps. |
| Job order | Not guaranteed. Jobs run concurrently. |
Next steps
- How workflows work: triggers, steps, templates, jobs and limits
- Triggers and scheduling: events, filters, schedules, manual buttons and API routes
- Step types: every step, parameter and output
- Build your first workflow: build and test one in about ten minutes
- Workflow recipes: ready-made patterns