Documentation Index
Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
Use this file to discover all available pages before exploring further.
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:- 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.
- 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.
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
- Open an agentic workflow in the agentic editor.
- Click Add Node on the canvas and expand Flow Control.
- Pick Approval (Human-in-the-Loop).

| Handle | Color | When it fires |
|---|---|---|
notify | Blue (top) | Fires once when the run reaches the node — use it to send the approver the approval link. |
approved | Green | Fires if the approver clicks Approve on the form. |
denied | Rose / Red | Fires if the approver clicks Deny or the link expires without a response. |
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:
| Field | Default | Purpose |
|---|---|---|
| Preamble | empty | Text shown to the approver on the form. Up to 5,000 characters. Supports Markdown. |
| Expiration (minutes) | 60 | How long the approval link stays valid. Minimum 1 minute, maximum 43,200 (30 days). After expiration the denied handle fires. |
| Allow public access | off | When on, anyone with the link can respond without signing in. When off, only authenticated org members can approve. |
| Name | Approval | Label 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 thedenied 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
- Workflow Pause: Automation reaches a decision point or encounters an exception
- Human Notification: System sends email, SMS, or other notification to relevant stakeholders
- Dynamic Interface: Workflow generates an ephemeral HTML application hosted at a secure file storage link
- Human Input: Stakeholder reviews context and provides input through the custom interface
- Data Storage: Human decision is saved to the datastore
- Workflow Resumption: Data change triggers workflow continuation with human input available
Key Components
- Datastore: Stores human decisions and approval data
- File Storage: Hosts ephemeral HTML applications
- Data Collection Triggers: Automatically resume workflows when human input is received
- Email/SMS Notifications: Alert humans when input is needed
- HTML Generation: Create custom approval interfaces dynamically
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:- Email Notifications: Detailed context with approval links
- SMS Alerts: Urgent notifications for time-sensitive approvals
- Slack Messages: Team notifications with workflow context
- Microsoft Teams: Enterprise collaboration notifications
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:- Queue Management: Pause and resume workflows efficiently
- Monitoring: Track approval status and bottlenecks
- Triggers: Automatic workflow resumption on human input
- State Management: Persistent approval state across workflow executions
Ready to add human oversight to your automations? Start with our Workflow Creation Guide or explore Trigger Configuration. Questions? Join our community on Discord

