Skip to main content

Approval Workflow Template

Add human approval steps to automated workflows. Perfect for sensitive decisions, budget approvals, content publishing, or any task requiring human oversight before proceeding.

Time to build: 20 minutes Difficulty: Intermediate Perfect for: Content approval, expense approval, deployment gates, compliance review


What It Does

Submit request → AI prepares → Wait for approval → Execute or reject

Combines automation with human judgment for critical workflows.


Step-by-Step

1. Create Workflow

  • New workflow → Name it "Content Approval Pipeline"
  • Webhook trigger for submissions

2. Add Agent for Preparation

  • Drag Agent Block
  • Connect Webhook to Agent
Model: GPT-4o

System Prompt:
"Review this content submission and prepare an approval package. Check for quality, brand alignment, and compliance. Provide recommendation."

User Prompt:
"Content to review: <webhook.body.content>
Submitted by: <webhook.body.author>
Category: <webhook.body.category>"

3. Add Database Query to Store Request

  • Drag Database Query Block
  • Connect Agent to Database
INSERT INTO approval_requests (
content,
author,
ai_review,
status,
created_at
) VALUES (
'<webhook.body.content>',
'<webhook.body.author>',
'<agent.content>',
'pending',
NOW()
) RETURNING id

4. Send Approval Request

  • Drag Slack Tool
  • Connect Database to Slack
Channel: #content-approvals
Message:
"📝 New Content Approval Request

Author: <webhook.body.author>
Category: <webhook.body.category>

AI Review:
<agent.content>

Approve: https://app.yourcompany.com/approve/<database.id>
Reject: https://app.yourcompany.com/reject/<database.id>"

Buttons: [Approve, Reject, Request Changes]

5. Create Approval Webhook Workflow

  • New workflow → Name it "Handle Approval Decision"
  • Webhook trigger: /approval-decision

6. Add Condition for Decision

  • Drag Condition Block
Condition: <webhook.body.decision> == "approved"

If True: Execute approved actions
If False: Handle rejection

7. Execute Approved Action (True Path)

  • Drag HTTP Request Block on True path
Method: POST
URL: https://cms.yourcompany.com/publish
Body:
{
"content": "<webhook.body.content>",
"author": "<webhook.body.author>",
"approved_by": "<webhook.body.approver>",
"approval_timestamp": "<webhook.timestamp>"
}

8. Update Database (True Path)

  • Drag Database Query
UPDATE approval_requests
SET
status = 'approved',
approved_by = '<webhook.body.approver>',
approved_at = NOW()
WHERE id = <webhook.body.request_id>

9. Notify Author (True Path)

  • Drag Email Tool
To: <webhook.body.author_email>
Subject: ✅ Content Approved

Your content has been approved by <webhook.body.approver>!

View published: <http_request.response.published_url>

10. Handle Rejection (False Path)

  • Drag Database Query on False path
UPDATE approval_requests
SET
status = 'rejected',
rejected_by = '<webhook.body.approver>',
rejection_reason = '<webhook.body.reason>',
rejected_at = NOW()
WHERE id = <webhook.body.request_id>

11. Notify Author of Rejection

  • Drag Email Tool
To: <webhook.body.author_email>
Subject: ❌ Content Requires Revision

Your content requires changes before approval.

Feedback from <webhook.body.approver>:
<webhook.body.reason>

Resubmit: https://app.yourcompany.com/submit

Real-World Examples

Expense Approval

  • Employee submits → Manager reviews → Finance approves → Payment processed

Code Deployment

  • PR created → CI passes → Lead approves → Deploy to production

Marketing Campaign

  • Create campaign → Legal reviews → CMO approves → Launch

Budget Request

  • Department requests → Finance reviews → CFO approves → Allocate funds

Advanced Features

Multi-Level Approvals

  • Chain multiple approval steps
  • CEO approval if amount > $10,000

Approval Timeouts

  • Use Schedule to auto-reject after 48 hours
  • Send reminder after 24 hours

Approval Delegation

  • Check if approver is out of office
  • Route to backup approver automatically

Approval Analytics

  • Track approval rates by person
  • Measure average approval time
  • Identify bottlenecks

Enhancements

Add Approval History

  • Store all approval chain steps
  • Create audit trail for compliance

Add Comments and Discussion

  • Let approvers add comments
  • Notify submitter of questions

Add Conditional Routing

  • Auto-approve low-risk items
  • Route high-risk items to multiple approvers

Add SLA Monitoring

  • Track time in approval queue
  • Escalate if taking too long

Cost

Per approval workflow:

  • AI review: ~$0.01-0.05
  • Database operations: Negligible
  • Notifications: ~$0.001

Monthly cost (100 approvals/month):

  • Total: ~$1-5/month
  • Human time saved: 2-5 hours
Next Step

Combine with State Management to track approval workflows across multiple sessions!