Skip to content
Proud to collaborate with Microsoft for Startups

cloudflare.worker.update-script ​

Update a Worker's script and re-apply secrets after wipe

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-cloudflare
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloudflare_worker_uuiduuidYes——
script_contentstringYes——
script_hashstringNo——
kv_bindingslistNo——
r2_bindingslistNo——
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloudflare_worker_uuiduuidYes——
script_contentstringYes——
script_hashstringNo——
kv_bindingslistNo——
r2_bindingslistNo——
actorstringNo——
script_namestringNo——
uploaded_atstringNo——
secrets_reapplied_atstringNo——
persisted_atstringNo——
completed_atstringNo——
failed_atstringNo——
failure_reasonstringNo—Engine-stamped human-readable failure reason
failed_at_statestringNo—Engine-stamped state when the workflow failed
failed_stepstringNo—Engine-stamped step name (DAG path)
failed_layerintegerNo—Engine-stamped layer index (DAG path)
errorstringNo—Engine-stamped exception message
error_typestringNo—Engine-stamped exception class name
failure_typestringNo—Engine-stamped failure category (atomic path)
failed_actionstringNo—Engine-stamped action method that raised (atomic path)

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—uploadInputs accepted
persistingNoNo—completeUpdating CloudflareWorker row
reapplying_secretsNoNo—persistRe-applying encrypted DB secret values to CF
uploadingNoNo—reapply_secretsUploading new script (CF wipes secrets)
completedNoYesYes—Update done
failedNoYesNo—Update failed

State Diagram ​

Transitions ​

FromActionToDescription
initiateduploaduploading—
uploadingreapply_secretsreapplying_secrets—
reapplying_secretspersistpersisting—
persistingcompletecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "cloudflare.worker.update-script",
  "initial_data": {
    "organization_uuid": "value",
    "cloudflare_worker_uuid": "value",
    "script_content": "value"
  }
}