Execute Workflow
Execute workflows in single mode or parallel batch mode. The API auto-detects execution mode based on request structure.
Endpoint
POST /api/workflows/execute
Single Mode Execution
Execute a single workflow with full debugging support including breakpoints and builder mode.
Request Body
Workflow definition containing nodes and edges
Array of workflow nodes. Each node represents an action (click, type, navigate, etc.)
Array of edges connecting nodes, defining execution flow
Optional array of node groups for organization
Execution mode: single, parallel, or auto (auto-detects)
Filename for the workflow (used in reports and logs)
Enable detailed trace logging for debugging
Enable video recording of browser session
Configure screenshot captureShow Screenshot Configuration
Enable screenshot capture
When to capture: pre, post, or both
Configure report generationShow Report Configuration
Report formats: html, allure, json, junit, csv, markdown
Output directory for reports
Number of reports to keep (older reports are deleted)
Configure breakpoints for debugging (single mode only)Show Breakpoint Configuration
When to pause: pre, post, or both
Which nodes to pause: all or marked
Enable builder mode for action recording (single mode only)
Example Request
curl -X POST http://localhost:3003/api/workflows/execute \
-H "Content-Type: application/json" \
-d '{
"workflow": {
"nodes": [
{
"id": "start-1",
"type": "start",
"position": { "x": 0, "y": 0 },
"data": {
"url": "https://example.com",
"headless": false
}
},
{
"id": "click-1",
"type": "click",
"position": { "x": 200, "y": 0 },
"data": {
"selector": "button.submit",
"selectorType": "css"
}
}
],
"edges": [
{
"id": "e-start-1-click-1",
"source": "start-1",
"target": "click-1"
}
]
},
"executionMode": "single",
"workflowFileName": "example-workflow.json",
"traceLogs": true,
"reportConfig": {
"enabled": true,
"reportTypes": ["html"],
"reportRetention": 10
}
}'
Response
Unique execution identifier
Execution status: running, completed, error, stopped, idle
{
"executionId": "exec-1709856234567",
"status": "running",
"executionMode": "single"
}
Parallel Mode Execution
Execute multiple workflows in parallel with worker pool management.
Execution Methods
Folder Path
Workflows Array
File Upload
Execute all workflows from a folder{
"folderPath": "./tests/workflows/sample",
"executionMode": "parallel",
"workers": 4,
"recursive": true,
"pattern": "*.json"
}
Execute workflows from an array{
"workflows": [
{ "nodes": [...], "edges": [...] },
{ "nodes": [...], "edges": [...] }
],
"executionMode": "parallel",
"workers": 2
}
Upload workflow files via multipart/form-data
Request Parameters (Parallel Mode)
Path to folder containing workflow JSON files (required for folder mode)
Array of workflow objects (required for workflows array mode)
Maximum concurrent workers. Use 1 for MCP/API to avoid wait node pauses
Output directory for reports, logs, screenshots, and videos
Scan subdirectories when using folderPath
File pattern for folder scanning (glob pattern)
Batch priority for queue ordering. Higher priority batches are processed first. Default 0 = FIFO order
Override Start node properties for all workflowsShow Start Node Overrides
Override video recording setting
Override screenshot capture for all nodes
Override screenshot timing: pre, post, both
Override delay in milliseconds between actions
Override scroll-before-action behavior
Example Request (Folder)
curl -X POST http://localhost:3003/api/workflows/execute \
-H "Content-Type: application/json" \
-d '{
"folderPath": "./tests/workflows/sample",
"executionMode": "parallel",
"workers": 4,
"recursive": true,
"pattern": "*.json",
"traceLogs": false,
"reportConfig": {
"enabled": true,
"reportTypes": ["html", "json"],
"reportRetention": 20
},
"startNodeOverrides": {
"screenshotAllNodes": true,
"screenshotTiming": "both"
}
}'
Response (Parallel Mode)
Source type: folder, files, or workflows
Folder path (if sourceType is folder)
Total number of workflows in batch
Number of valid workflows
Number of invalid workflows
Array of validation errors for invalid workflows
Array of execution details
Full path to workflow file
{
"batchId": "batch-1709856234567",
"executionMode": "parallel",
"sourceType": "folder",
"folderPath": "./tests/workflows/sample",
"totalWorkflows": 5,
"validWorkflows": 5,
"invalidWorkflows": 0,
"validationErrors": [],
"executions": [
{
"executionId": "exec-1709856234567-1",
"workflowFileName": "workflow1.json",
"workflowPath": "./tests/workflows/sample/workflow1.json",
"status": "running"
},
{
"executionId": "exec-1709856234567-2",
"workflowFileName": "workflow2.json",
"workflowPath": "./tests/workflows/sample/workflow2.json",
"status": "queued"
}
]
}
Scan Folder
Preview workflows in a folder without executing them. Returns validation status for each discovered file.
Endpoint
Query Parameters
Path to folder containing workflow JSON files (relative or absolute)
Glob pattern for file matching
Example Request
curl "http://localhost:3003/api/workflows/scan?folderPath=./tests/workflows&recursive=true&pattern=*.json"
Response
[
{
"fileName": "workflow1.json",
"filePath": "./tests/workflows/workflow1.json",
"isValid": true,
"validationErrors": [],
"workflow": {
"nodes": [...],
"edges": [...]
}
},
{
"fileName": "invalid-workflow.json",
"filePath": "./tests/workflows/invalid-workflow.json",
"isValid": false,
"validationErrors": [
"Missing required field: nodes",
"Missing required field: edges"
]
}
]
Error Responses
Detailed error description
Example Errors
400 Bad Request
404 Not Found
500 Server Error
{
"error": "Invalid workflow format",
"message": "Workflow must contain nodes and edges arrays"
}
{
"error": "Folder not found",
"message": "Path is not a directory: ./invalid/path"
}
{
"error": "Failed to execute workflow",
"message": "Unexpected error during execution"
}