惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
J
Java Code Geeks
Jina AI
Jina AI
罗磊的独立博客
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园 - 叶小钗
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
B
Blog
V
Visual Studio Blog
雷峰网
雷峰网
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
You Approve, AI Publishes: Human Approval Circuit via Wha...
jesus manriq · 2026-05-15 · via DEV Community

Your pipeline already generates copy and images. The next step is the most important decision: publish or not?

The "human-in-the-loop" pattern is what separates an AI toy from a real production tool. The human decides. The AI executes. And the most immediate channel for that decision: WhatsApp.

The Approval Architecture

AI generates copy + image → WhatsApp Preview (text + image)
                                ↓
                           You reply:
                      ┌──────┴──────┐
                     OK             NO (+ feedback)
                      ↓              ↓
                Publish to      Regenerate with
                IG/TikTok       your corrections
                      ↓              ↓
           WhatsApp: "✅       Resend new
           Published"           preview

Enter fullscreen mode Exit fullscreen mode

Total review time: 30 seconds. Open WhatsApp, see the image, read the copy. If you like it, "OK." If not, "NO, make it more technical." The AI understands natural language feedback.

WhatsApp Integration Options

Option A: Evolution API (recommended for self-hosted)

Evolution API is an open-source WhatsApp gateway with a clean REST API:

docker run -d -p 8080:8080 atendai/evolution-api

# Send text message
POST http://localhost:8080/message/sendText/evolution
Headers: apikey: YOUR_API_KEY
Body: {
  "number": "584140108660",
  "text": "📱 *New post ready for review:*\n\n{copy}\n\nOK or NO?"
}

# Send image
POST http://localhost:8080/message/sendMedia/evolution
Headers: apikey: YOUR_API_KEY
Body: {
  "number": "584140108660",
  "mediatype": "image",
  "caption": "Post preview",
  "media": "https://your-server/images/preview.png"
}

Enter fullscreen mode Exit fullscreen mode

Option B: Meta WhatsApp Cloud API (official)

Requires a verified Meta Business Account. More bureaucratic but more stable:

POST https://graph.facebook.com/v21.0/{phone_number_id}/messages
Headers: Authorization: Bearer {meta_token}
Body: {
  "messaging_product": "whatsapp",
  "to": "584140108660",
  "type": "image",
  "image": { "link": "https://your-server/images/preview.png", "caption": "OK or NO?" }
}

Enter fullscreen mode Exit fullscreen mode

Option C: Direct webhook to OpenClaw (used in this series)

If your AI assistant is already connected to WhatsApp via OpenClaw, the n8n webhook sends the preview and OpenClaw listens for your response:

POST https://ai.guayoyo.tech/plugins/webhooks/approval
Body: {
  "action": "send_preview",
  "recipient": "+584140108660",
  "copy": "post text...",
  "image_url": "https://...",
  "brief_id": "post-2026-05-14-001"
}

Enter fullscreen mode Exit fullscreen mode

The Circuit in n8n

Node 1: Send Preview via WhatsApp

// HTTP Request → Evolution API
const preview = {
  number: "584140108660",
  text: `📱 *New post to review*\n\n${$json.hook}\n\n${$json.body}\n\n${$json.hashtags}\n\n${$json.cta}\n\n---\nReply *OK* to publish or *NO* + feedback`,
};
// If image exists, send image first then text

Enter fullscreen mode Exit fullscreen mode

Node 2: Wait for Response (Webhook)

n8n exposes a Webhook node that waits for the response:

Webhook Node (POST /approval-response)
  ↓
IF node: Does text contain "OK"?
  ├─ Yes → Continue to publishing
  └─ No → Extract feedback → Regenerate

Enter fullscreen mode Exit fullscreen mode

Node 3: Switch — OK or NO

const response = $input.first().json.body.toLowerCase();

if (response.includes("ok") && !response.includes("no ok")) {
  return [{ action: "publish", data: $input.first().json }];
} else {
  const feedback = response.replace(/^no[,\s]*/i, "").trim();
  return [{ action: "regenerate", feedback: feedback, data: $input.first().json }];
}

Enter fullscreen mode Exit fullscreen mode

Node 4: 30-Minute Timeout

If you don't respond within 30 minutes, the flow saves a draft and notifies you:

const draft = {
  copy: $json.copy,
  image_url: $json.image_url,
  status: "draft_timeout",
  timestamp: new Date().toISOString()
};
// Save to database or Google Sheet
// Send WhatsApp: "⏰ The 10am post is in drafts. Review when you can."

Enter fullscreen mode Exit fullscreen mode

Complete Circuit Flow

1. Agent generates copy + SD generates image
              ↓
2. WhatsApp Preview: "📱 New post for review"
              ↓
3. Webhook waits for your response (30 min timeout)
              ↓
         ┌────┴────┐
        OK         NO + feedback
         ↓          ↓
4a. Publish      4b. Regenerate
     IG/TikTok      (back to agent
     ↓              with feedback)
5. WhatsApp:        ↓
   "✅ Done"     New preview

Enter fullscreen mode Exit fullscreen mode

Why WhatsApp and Not a Dashboard

Web Dashboard WhatsApp
Requires browser + login Already open
You have to go find it It comes to you
~2-3 minutes per review ~30 seconds per review
Desktop only Anywhere

Friction kills consistency. If publishing requires 3 extra steps, by day three you stop doing it. With WhatsApp, it's a reflex: see, respond, done.

Security: Only You Can Approve

The approval webhook only accepts responses from your number:

if (incoming.from !== "+584140108660") {
  return { status: "ignored", reason: "not_authorized" };
}

Enter fullscreen mode Exit fullscreen mode

No one else can approve posts. The circuit is human, but the security is programmatic.


Ready for a content pipeline where you decide and AI executes? At Guayoyo Tech, we build the complete circuit — from generation to publishing, with your approval at every step.