Dry-run a block with sample input
test_blockRuns one saved Process block in isolation with sample input and optional dry-run stubs to validate output, surface errors, and self-correct before deployment.
Instructions
Runs ONE saved block in isolation with sample input (the rest of the flow does NOT run) and returns its output — or, on error, a 400 whose details carry the JS/sandbox error. Use it to test a Process block and self-correct BEFORE deploying. input is the upstream value the block reads as input; request simulates an API Endpoint flow's request global. The block's code really runs (may make HTTP/SQL calls), so it needs flows:execute. Save the block first (set_workspace_content), then test by its blockId. PASS dryRun:true WHILE ITERATING: the block still runs on the real engine, but fetch and sql.query are answered from stubs and reach NOTHING — no third-party API calls burned, no writes to a real database. The reply's dryRun report lists every URL and query the block would have hit, which is also how you discover what it actually talks to. Supply dryRunHttp/dryRunSql to control the canned answers; unstubbed calls get an empty 200 / no rows. Drop dryRun for a final real test before deploying. The reply carries a usage block (statements, limitStatements, durationMs, fetches, storeOps) — SIZE YOUR BATCHES FROM IT instead of guessing: if a run uses a small fraction of the statement budget, do more work per call rather than paying for extra round-trips.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspaceId": "<workspaceId>",
"blockId": "<blockId>"
},
"name": "test_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | No | Sample upstream output the block reads as `input`. | |
| dryRun | No | Run on the real engine but stub fetch/sql so nothing outside is reached. Use while iterating. | |
| blockId | Yes | ||
| request | No | Simulate an API Endpoint flow's `request` global (method/headers/query/body/params). | |
| dryRunSql | No | Canned SQL results, first match wins. Implies dryRun:true. | |
| dryRunHttp | No | Canned HTTP replies, first match wins. Implies dryRun:true. | |
| workspaceId | Yes |