Overview
When a workflow reaches ahuman_approval step, Station can notify external systems via webhooks. This enables human-in-the-loop automation with:
- Slack notifications with approve/reject buttons
- ntfy.sh alerts for mobile push notifications
- PagerDuty escalations for critical decisions
- Custom dashboards showing pending approvals
Configuration
Config File
Add to yourconfig.yaml:
Environment Variables
Webhook Payload
When a workflow reaches ahuman_approval step, Station sends:
Payload Fields
Integration Examples
ntfy.sh
ntfy is a simple HTTP-based pub-sub notification service - perfect for mobile push notifications.2
Subscribe to your topic
Open the app and subscribe to
station-approvals (or your chosen topic name)3
Configure Station
4
Test the webhook
Slack
Configure a Slack Incoming Webhook:PagerDuty
Send approval requests as PagerDuty incidents:Custom Webhook Proxy
Build a simple proxy to transform Station’s payload for any system:Approval API
Once notified, approvers can use the URLs in the payload or call the API directly.Approve a Request
Reject a Request
CLI Commands
Audit Logging
All webhook deliveries and approval decisions are logged for compliance and debugging.Webhook Delivery Logs
Every webhook attempt is recorded with:- Request payload sent
- Response status code
- Response body (truncated)
- Duration in milliseconds
- Error message (if failed)
View Audit Trail
Audit Event Types
Retry Behavior
Station automatically retries failed webhook deliveries:- Max retries: 3 attempts
- Backoff: Exponential (1s, 4s, 9s)
- Timeout: Configurable per-request (default 10s)
Troubleshooting
Webhook not received
Webhook not received
- Verify webhook URL is correct:
- Check Station logs:
- Check audit logs:
Webhook returns non-2xx
Webhook returns non-2xx
Check the audit log for the response body:
Approval URL not working
Approval URL not working
- Verify Station is accessible from where approvals happen
- Check approval hasn’t expired:
stn workflow approvals get appr-xxx - Check approval wasn’t already decided
Workflow stuck after approval
Workflow stuck after approval
- Check workflow run status:
stn workflow runs get run-xyz --steps - Check NATS is running:
stn status - Check logs for errors
Security Considerations
Recommendations
- Use HTTPS - Encrypt webhook traffic
- Protect approval API - Run Station on internal network or use authentication
- Audit retention - Configure log retention for compliance
- Validate approvers - Use the
approversfield to restrict who can approve
Comparison: Notifications vs Approval Webhooks
Next Steps
- Workflows - Create workflows with approval steps
- Notifications - Agent-initiated notifications
- Webhooks - Trigger agents from external systems

