Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

Approval gates

Pause a workflow mid-execution and wait for a human to approve or reject the next step. Essential for sensitive operations — refunds, content publishing, user deletion, external API calls.

How it works

  1. A workflow reaches an Approval Gate node
  2. Execution pauses with status awaiting_approval
  3. An email is sent to the configured approver (optional)
  4. The approval appears in the WP admin approval queue
  5. The approver reviews the summary and clicks Approve or Reject
  6. The workflow resumes on the approved or rejected output branch

Node configuration

SettingDescription
Approver emailWho receives the approval request. Supports tokens like {{trigger.data.customer_email}}
SummaryWhat the approver sees. Use tokens to include dynamic data
Auto-approve timeoutIf the approver doesn't respond within N minutes, auto-approve
Cancel afterIf the approver doesn't respond within N hours, cancel the execution
Auto-approve on timeoutYes/no — whether timeout triggers approval or rejection

Approval queue

REST: GET /pfw/v1/approvals/pending — all pending approvals REST: POST /pfw/v1/approvals/{id}/approve — approve with optional note REST: POST /pfw/v1/approvals/{id}/reject — reject with optional note

The approval queue is visible in the WP admin under PF Workflow → Approvals. Users need pfw_approve_workflows capability (inherited from pfw_manage_workflows).

What the approver sees

  • Workflow name and execution ID
  • Summary — the custom text you configured with tokens resolved
  • Trigger context — what triggered this workflow (manual, webhook, etc.)
  • Timeline so far — which nodes executed before the gate
  • Approve/Reject buttons with optional note field

Rejection behaviour

When rejected, the workflow continues on the rejected output branch. The rejection note is available via {{approval.note}} in downstream nodes. Use this to send a notification explaining why the action was rejected.