An AI Social Media Campaign Engine with Human-in-the-Loop Approval
A 63-node n8n workflow that generates on-brand LinkedIn and Facebook campaigns with AI copy and imagery, gates every image through Slack human approval, and schedules posts via Late.
THE BRIEF
What the system needed to do.
This project is a 63-node n8n workflow that turns a single brand intake form into a complete, scheduled social media campaign for LinkedIn and Facebook, with human approval built in. A research-augmented AI strategist (GPT-5-mini via OpenRouter, plus Perplexity search) applies proven copy frameworks to generate platform-tailored posts, each with copy, hashtags, a distinct visual style, and a posting date. Images are created with Google Imagen 4, then sent one by one to Slack for approval — rejected images are revised via NanoBanana using the reviewer's feedback. Approved assets are stored in Drive, logged in Sheets, and scheduled via the Late API.
The scope
Generate a full multi-platform social campaign — copy and on-brand imagery — from a single brand brief, with human approval before anything posts.
DESIGN CHOICES
What makes the build interesting.
Brand & social media marketers
Platform-tailored AI content from one brief
Per-image human approval with revise loop
End-to-end automation with audit trail
THE ARCHITECTURE
Follow the flow.
- Brand intake — a form captures brand name, industry, audience, value proposition, voice, focus topics, and website as the creative brief.
- Strategic content generation — a research-augmented AI agent selects a copy framework, runs web research when useful, and outputs platform-specific posts as structured JSON.
- Image generation — each post's visual prompt is rendered by Google Imagen 4 (via Replicate), processed one post at a time.
- Human approval in Slack — every image is sent for sign-off; the workflow waits for an approve or a reject-with-feedback response.
- Revise loop (on rejection) — feedback is passed to the NanoBanana editing model, and the revised image is sent back to Slack until approved.
- Storage & logging — the approved (original or edited) image is uploaded to Google Drive and the post is recorded in Google Sheets.
- Multi-platform scheduling — a switch routes each post and schedules it to LinkedIn or Facebook/Instagram via the Late API on the assigned date.
Tools and platforms
- n8n — workflow orchestration (63 nodes, self-hosted)
- OpenRouter (GPT-5-mini) — the content strategist LLM
- Perplexity — live web research tool for the agent
- n8n Think tool — explicit strategic-planning step for the agent
- Google Imagen 4 (via Replicate) — AI image generation
- NanoBanana (via Replicate) — feedback-driven image editing
- Slack — human-in-the-loop approval (send-and-wait-for-response)
- Google Drive — approved-asset storage
- Google Sheets — campaign record & audit log
- Late (getlate.dev) — multi-platform post scheduling (LinkedIn, Facebook/Instagram)
- n8n Form Trigger — brand intake form
- Structured Output Parser — schema-enforced campaign JSON
What the design enables.
- Automation speed without publishing risk — the AI does the strategy, copywriting, and image generation, but no asset is ever stored or scheduled without explicit human approval, eliminating off-brand or off-tone posts going live.
- Genuinely on-brand, research-informed content — by building from a structured brand brief and pulling live market context via Perplexity, output reflects the brand's voice and value proposition rather than generic filler.
- Feedback that refines instead of restarting — the reject-with-feedback loop edits the existing image rather than regenerating from scratch, so reviewer notes converge quickly on a usable asset.
The difficult parts.
- Keeping a human in control without killing throughput. Full automation risks bad posts; full manual work is slow. We used Slack send-and-wait approval gates inside a batching loop, so the pipeline pauses per image for sign-off then resumes automatically.
- Turning vague reviewer feedback into a better image. A simple approve/reject wastes the reviewer's intent. We routed rejection feedback into the NanoBanana editing model and looped the revised image back to Slack, refining in place until approved.
- Producing distinct voices for two very different platforms. One generic caption suits neither LinkedIn nor Facebook. We instructed the agent to generate separate post sets per platform — professional and thought-leadership for LinkedIn, warm and community-driven for Facebook — with matching visual styles.
Build notes and context.
The brief: a full social campaign from one form, with a human holding the publish button.
The client wanted to turn a single brand intake into a complete, ready-to-schedule social media campaign across LinkedIn and Facebook — original copy and visuals for every post — while keeping a person firmly in control of what actually goes live. The two requirements were in tension: the speed and volume of full automation, paired with the editorial safety of human review. We resolved that tension with a 63-node n8n workflow built around an AI content strategist and a per-image human-approval loop.
Stage 1 — Brand intake. Everything starts from a simple form capturing the inputs that make content on-brand rather than generic: brand name, industry, target demographics and location, primary value proposition, the customer challenge, desired outcome, brand voice, specific topics to focus on, and the company website. These variables become the creative brief for the rest of the pipeline.
Stage 2 — Strategic content generation. A research-augmented AI agent (running GPT-5-mini via OpenRouter, with a Perplexity web-search tool and an explicit "think" step for planning) acts as the campaign strategist. Rather than spitting out captions, it first reasons about the right approach — selecting a proven copy framework such as PAS (Problem-Agitate-Solution), StoryBrand, or BAB (Before-After-Bridge) — and pulls current market or local context via web search when fresh data would strengthen the message. It then produces a batch of platform-specific posts: a professional, thought-leadership tone for LinkedIn and a warmer, community-driven tone for Facebook. Each post arrives as structured JSON containing the copy, emojis and hashtags, a distinct visual style (photography, infographic, 3D scene, or illustration), strategic overlay text, and a suggested posting date.
Stage 3 — Image generation. For each post, the matching image prompt is sent to Google Imagen 4 (hosted on Replicate) to generate an on-brief visual. Posts are processed one at a time through a batching loop so each image can be handled — and reviewed — individually.
Stage 4 — Human-in-the-loop approval. This is the heart of the system. Every generated image is sent to a reviewer in Slack using a send-and-wait-for-response step that pauses the workflow. The reviewer either approves the image — and the pipeline moves on to the next post — or rejects it with written feedback. On rejection, that feedback is fed to NanoBanana (an image-editing model, also on Replicate), which revises the image accordingly, and the new version is sent straight back to Slack for another round. The loop continues until a human signs off, so nothing proceeds on a visual the reviewer hasn't explicitly accepted.
Stage 5 — Storage and record-keeping. Once approved, an image-path switch resolves whether to use the original or the edited version, the final asset is uploaded to Google Drive, and the post's details are appended to a Google Sheets record — giving the team a clean, auditable log of every campaign asset and its metadata.
Stage 6 — Multi-platform scheduling. A platform switch routes each post to the correct destination, and the finished, approved content is scheduled through the Late API (getlate.dev) — to LinkedIn for the professional posts and to Facebook/Instagram for the social ones — using the brand's connected account IDs and the posting dates assigned earlier.
Why this design works. It captures the economics of automation without surrendering editorial control. The AI handles the heavy lifting — strategy, research, copywriting across two distinct platform voices, and four visual styles — while the Slack approval gate guarantees a human signs off on every single image before it's stored or scheduled. The rejection-and-revise loop means feedback doesn't bounce work back to square one; it refines the existing asset in place. Google Sheets provides the audit trail, Google Drive the asset library, and the whole orchestration runs on self-hosted infrastructure, keeping brand inputs and credentials under the owner's control.
Have a related process in mind?
Tell me what goes in, what should come out and where the current process gets stuck.