Skip to main content

What is Human-in-the-Loop?

Human-in-the-Loop (HITL) workflows combine the efficiency of automation with human judgment and oversight. Pinkfish enables you to seamlessly integrate human decision points, approvals, and interventions into your automated processes through dynamic web applications, notifications, and data-driven workflow resumption. Pinkfish supports HITL two ways:
  1. The Approval node — a built-in control-flow node for agentic workflows that pauses the run, shows a hosted approval form, and branches on the approver’s response. This is the fastest way to add a single approval gate.
  2. The pattern-based approach — manually generate an HTML form, store it in the filestore, write the decision to a datastore, and resume via a datastore trigger. Use this when you need a custom review UI or want to collect more than a yes/no decision.
Start with the Approval node; drop down to the pattern when you outgrow it.

Approval Node (Agentic Editor)

The Approval node is the fastest way to add a “wait for a human” gate to an agentic workflow. It handles the approval form, the secure link, the notification hand-off, the timeout, and the branching so you do not have to build any of it yourself.

When to use it

  • You need a simple approve / deny decision before continuing the run.
  • You want to send the approver a link over Slack, Teams, or email and let them act without logging in.
  • The decision should expire automatically (for example, if nobody responds in 24 hours, deny by default).

Adding the node

  1. Open an agentic workflow in the agentic editor.
  2. Click Add Node on the canvas and expand Flow Control.
  3. Pick Approval (Human-in-the-Loop).
The node drops onto the canvas with three output handles:
Approval node on the agentic editor canvas with three labeled output handles — notify (blue), approved (green), and denied (red) — wired next to the Manual Trigger.
HandleColorWhen it fires
notifyBlue (top)Fires once when the run reaches the node — use it to send the approver the approval link.
approvedGreenFires if the approver clicks Approve on the form.
deniedRose / RedFires if the approver clicks Deny or the link expires without a response.
Wire notify to a messaging node (Slack, Teams, email, SMS) that includes the {{approvalLink}} variable from the node’s output. Wire approved and denied to the next steps you want for each outcome.

Configuration

Open the node’s settings panel to configure:
Approval node settings panel in the agentic editor showing Name, Preamble textarea, Link expiration (minutes), and the Allow public access toggle.
FieldDefaultPurpose
PreambleemptyText shown to the approver on the form. Up to 5,000 characters. Supports Markdown.
Expiration (minutes)60How long the approval link stays valid. Minimum 1 minute, maximum 43,200 (30 days). After expiration the denied handle fires.
Allow public accessoffWhen on, anyone with the link can respond without signing in. When off, only authenticated org members can approve.
NameApprovalLabel that appears on the canvas. Does not affect behavior.

What the approver sees

The approver clicks the link from the notification and lands on a hosted form at /approve/{token} served by Pinkfish. The form shows the preamble text (rendered as Markdown) with Approve and Deny buttons. Submitting either button closes the loop and the workflow resumes immediately on the corresponding handle. If Allow public access is off, the approver is prompted to sign in before the form renders.

Timeout behavior

If nobody submits the form before the expiration, Pinkfish marks the approval as expired and fires the denied handle. The expired link can no longer be used — a stale approver who follows the link later sees an expired-approval page.

Legacy note: the pattern-based approach

If you need more than a yes/no decision, a custom form layout, or multi-stage review, the pattern-based approach still works. It’s described below and relies on generating HTML forms into the filestore, writing responses to a datastore, and resuming with a datastore trigger.

How Human-in-the-Loop Works in Pinkfish

The HITL Pattern

  1. Workflow Pause: Automation reaches a decision point or encounters an exception
  2. Human Notification: System sends email, SMS, or other notification to relevant stakeholders
  3. Dynamic Interface: Workflow generates an ephemeral HTML application hosted at a secure file storage link
  4. Human Input: Stakeholder reviews context and provides input through the custom interface
  5. Data Storage: Human decision is saved to the datastore
  6. Workflow Resumption: Data change triggers workflow continuation with human input available

Key Components

Implementation Patterns

1. Approval Checkpoints

Add approval gates at critical workflow stages:

2. Exception Handling

Handle workflow failures with human intervention:

3. Quality Review Gates

Add human quality checks for critical outputs:

Creating Dynamic HTML Applications

Ephemeral Web Interfaces

Workflows can generate custom HTML applications for human interaction:

Example HTML Generation

Notification Strategies

Multi-Channel Notifications

Alert stakeholders through multiple channels:

Escalation Patterns

Implement approval escalation workflows:

Advanced HITL Patterns

Collaborative Decision Making

Enable multiple stakeholders to provide input:

Conditional Human Intervention

Add smart intervention triggers:

Audit Trail Integration

Maintain complete audit trails:

Security and Compliance

Secure Access

  • Expiring Links: HTML applications use time-limited access URLs
  • Authentication: Integrate with organization’s identity systems
  • Audit Logging: Complete trail of human interactions
  • Data Encryption: Sensitive approval data encrypted in datastore

Compliance Features

  • Role-Based Approvals: Route to appropriate stakeholders based on rules
  • Approval Hierarchies: Multi-level approval workflows
  • Regulatory Compliance: SOX, GDPR, and other regulatory requirement support
  • Evidence Collection: Maintain approval artifacts for auditing

Best Practices

Design Principles

  • Clear Context: Provide complete information for informed decisions
  • Simple Interfaces: Make approval forms easy to understand and use
  • Mobile-Friendly: Ensure HTML applications work on mobile devices
  • Timeout Handling: Always include escalation and timeout mechanisms

User Experience

  • Professional Appearance: Use consistent styling and branding
  • Progress Indicators: Show workflow status and next steps
  • Help Documentation: Include guidance for approvers
  • Confirmation Messages: Provide clear feedback after decisions

Operational Excellence

  • Monitor Approval Times: Track and optimize approval processes
  • Handle Exceptions: Plan for approver unavailability
  • Test Regularly: Validate approval workflows in staging environments
  • Document Processes: Maintain clear approval workflow documentation

Integration with Orchestration

Human-in-the-Loop workflows integrate seamlessly with Pinkfish’s orchestration capabilities:
Ready to add human oversight to your automations? Start with our Workflow Creation Guide or explore Trigger Configuration. Questions? Join our community on Discord