Skip to content
Proud to collaborate with Microsoft for Startups

cloudflare.pages.set-env ​

Set or update plain (non-secret) environment variables on a Cloudflare Pages project for a given environment.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-cloudflare
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID.
connection_uuiduuidYes—Cloudflare CloudConnection UUID.
project_namestringYes—Pages project name.
environmentstringNo—production or preview; default production.
env_varsjsonYes—Map of name to value for plain env vars to set.
replacebooleanNo—Replace the whole env map instead of merging; default false.

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID.
connection_uuiduuidYes—Cloudflare CloudConnection UUID.
project_namestringYes—Pages project name.
environmentstringNo—production or preview; default production.
env_varsjsonYes—Map of name to value for plain env vars to set.
replacebooleanNo—Replace the whole env map instead of merging; default false.
applied_countintegerNo—Env vars applied.
statusstringNo—Result status.
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
pendingYesNo—executePending env update
completedNoYesYes—Env vars applied
failedNoYesNo—Env update failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

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

{
  "workflow_type": "cloudflare.pages.set-env",
  "initial_data": {
    "organization_uuid": "value",
    "connection_uuid": "value",
    "project_name": "value",
    "env_vars": "value"
  }
}