spad.cloudflare.create_worker ​
Create Cloudflare Worker script for a SPAD site (DAG step)
Upload a Worker script bound to the site's R2 bucket.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | string | Yes | — | SpadSite.id whose Worker should be created |
slug | string | Yes | — | Site slug used to derive the Worker script name |
cloud_connection_uuid | string | Yes | — | Cloudflare CloudConnection.id |
r2_bucket_name | string | Yes | — | R2 bucket name the Worker should proxy to |
organization_uuid | string | No | — | Organization that owns the site |
workflow_run_id | string | No | — | — |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
worker_script_name | string | Yes | — | Worker script name (ltinteg-{slug}) |
worker_url | string | Yes | — | Public Worker URL |
completed_at | string | No | — | ISO8601 timestamp when the step reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the step reached FAILED |
workflow_run_id | string | No | — | — |
site_uuid | string | No | — | SpadSite.id whose Worker should be created |
slug | string | No | — | Site slug used to derive the Worker script name |
cloud_connection_uuid | string | No | — | Cloudflare CloudConnection.id |
r2_bucket_name | string | No | — | R2 bucket name the Worker should proxy to |
organization_uuid | string | No | — | Organization that owns the site |
workflow_run_uuid | string | No | — | Parent workflow run ID stamped by the DAG engine (legacy alias) |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
failure_reason | string | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | Worker creation step accepted |
run | No | No | — | complete | Creating Worker script |
completed | No | Yes | Yes | — | Worker script created |
failed | No | Yes | No | — | Worker script creation failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | Start Worker creation |
run | complete | completed | Mark Worker creation completed |
* (any state) | fail | failed | Mark Worker creation failed |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.cloudflare.create_worker",
"initial_data": {
"site_uuid": "value",
"slug": "value",
"cloud_connection_uuid": "value",
"r2_bucket_name": "value"
}
}