Case 003 · AI Content Engine

AI drafts.
Humans decide.

Workflow design and development by Agne Paliulyte.
AI-assisted production, with a human approval gate.

42-node n8n workflow · Claude Sonnet plans in strict JSON · validated and deadlined · a person approves

ImplementedNo test run recorded · not deployed

AI Content Engine / Architecture

42 nodes.
One human.

Actual n8n export · 7 Sep 2026
Structure, not a live run.

01 / Topic inputTopic Added1. Topic AddedPrepare Content Request2. Prepare Content RequestCreate Content Request3. Create Content RequestNew Request?4. New Request?02 / Creative planBuild Claude Request1. Build Claude RequestClaude — CreativeDirector2. Claude — Creative DirectorValidate & Parse Plan3. Validate & Parse PlanSave Content Plan4. Save Content PlanPlan Saved?5. Plan Saved?03 / Image generationCreate Image GenerationJob1. Create Image Generation JobSubmit Image Job2. Submit Image JobRegister ImageSubmission3. Register Image SubmissionWait 8s (Image)4. Wait 8s (Image)Check Image Status5. Check Image StatusRecord Image Poll6. Record Image PollImage Completed?7. Image Completed?Fetch Image Result8. Fetch Image ResultRecord Image Generated9. Record Image GeneratedImage Errored?10. Image Errored?Record Image Failure11. Record Image FailureImage Timed Out?12. Image Timed Out?Record Image Timeout13. Record Image Timeout04 / Video generationCreate Video GenerationJob1. Create Video Generation JobSubmit Video Job2. Submit Video JobRegister VideoSubmission3. Register Video SubmissionWait 25s (Video)4. Wait 25s (Video)Check Video Status5. Check Video StatusRecord Video Poll6. Record Video PollVideo Completed?7. Video Completed?Fetch Video Result8. Fetch Video ResultRecord Video Generated9. Record Video GeneratedVideo Errored?10. Video Errored?Record Video Failure11. Record Video FailureVideo Timed Out?12. Video Timed Out?Record Video Timeout13. Record Video Timeout05 / Copy QABuild QA Request1. Build QA RequestClaude — Copy QA2. Claude — Copy QAParse Copy QA Verdict3. Parse Copy QA VerdictCopy QA Approved?4. Copy QA Approved?Record Copy QA Approved5. Record Copy QA ApprovedRecord Copy QA Rejected6. Record Copy QA Rejected06 / Human approvalNotify Approval Pending1. Notify Approval Pending — disabled
42 nodes / 44 connections / Failure paths retained

Topic Added

01 / Google Sheets

Topic input

A new sheet row starts a run: topic, brand voice, visual style, platform. The same request twice in a day is caught by an idempotency key.

New row · checked every minute

Evidence · read from the n8n export

Built to stop, not to guess.

Each step below is a node in the exported workflow. State lives in PostgreSQL: requests, plans, generation jobs, QA reviews and an event log.

  1. 01Input

    One sheet row

    Keyed by request and Oslo calendar day: the same request twice in a day is caught before anything paid runs.

    n8n · Prepare Content Request · Create Content Request

  2. 02AI planning

    Claude Sonnet

    Asked for one plan in strict JSON: hook, caption, hashtags, image and motion prompts.

    n8n · Claude - Creative Director

  3. 03Validation

    Checked, then tracked

    Invalid JSON or a missing key stops the run. Image and video are tracked jobs: 12 polls at most, 5- and 10-minute deadlines.

    n8n · Validate & Parse Plan · Image / Video Timed Out?

  4. 04Human approval

    A person

    A second Claude call reviews the copy; an unreadable verdict counts as not approved. Either way, every draft stops at approval pending.

    n8n · Parse Copy QA Verdict · Record Copy QA Approved / Rejected

Designed
Flow, data model and failure paths
Implemented
42 nodes, 44 connections · exported 7 Sep 2026
Test runs
None recorded in the export
Deployed
Not activated · reviewer e-mail switched off
The workflow, node by node 42 nodes / Connections / Services

Evidence

The workflow, node by node.

Drawn from the n8n export itself — 42 nodes, every connection as built. Side paths handle failures and timeouts; the loop polls until a job finishes or runs out of time.

  1. 01

    Topic input

    Google Sheets

    • TriggerTopic AddedNew row · checked every minute
    • CodePrepare Content RequestNormalises the row · idempotency key
    • PostgresCreate Content RequestOnce per key · planning
    • IfNew Request?yes → Build Claude Requestno → stop
  2. 02

    Creative plan

    Claude Sonnet

    • CodeBuild Claude RequestVoice, style, topic, platform → schema
    • HTTPClaude — Creative DirectorClaude Sonnet
    • CodeValidate & Parse PlanValid JSON and required keys, or stop
    • PostgresSave Content PlanPlan stored · plan ready
    • IfPlan Saved?yes → Create Image Generation Jobno → stop
  3. 03

    Image generation

    fal.ai / FLUX schnell

    • PostgresCreate Image Generation JobJob queued · max 12 polls
    • HTTPSubmit Image Jobfal.ai · FLUX schnell
    • PostgresRegister Image SubmissionImage generating · 5-minute deadline
    • WaitWait 8s (Image)
    • HTTPCheck Image Statusfal.ai
    • PostgresRecord Image PollCounts polls · checks limit and deadline
    • IfImage Completed?yes → Fetch Image Resultno → Image Errored?
    • HTTPFetch Image Resultfal.ai
    • PostgresRecord Image GeneratedJob completed · video generating→ Create Video Generation Job
    • IfImage Errored?yes → Record Image Failureno → Image Timed Out?
    • PostgresRecord Image FailureJob and request failedend
    • IfImage Timed Out?yes → Record Image Timeoutno → Wait 8s (Image)
    • PostgresRecord Image TimeoutJob timed out · request failedend
  4. 04

    Video generation

    fal.ai / Kling

    • PostgresCreate Video Generation JobJob queued · max 12 polls
    • HTTPSubmit Video Jobfal.ai · Kling image-to-video
    • PostgresRegister Video Submission10-minute deadline
    • WaitWait 25s (Video)
    • HTTPCheck Video Statusfal.ai
    • PostgresRecord Video PollCounts polls · checks limit and deadline
    • IfVideo Completed?yes → Fetch Video Resultno → Video Errored?
    • HTTPFetch Video Resultfal.ai
    • PostgresRecord Video GeneratedJob completed→ Build QA Request
    • IfVideo Errored?yes → Record Video Failureno → Video Timed Out?
    • PostgresRecord Video FailureJob and request failedend
    • IfVideo Timed Out?yes → Record Video Timeoutno → Wait 25s (Video)
    • PostgresRecord Video TimeoutJob timed out · request failedend
  5. 05

    Copy QA

    Claude Sonnet

    • CodeBuild QA RequestBrand-voice rules + caption + hook
    • HTTPClaude — Copy QAClaude Sonnet
    • CodeParse Copy QA VerdictUnreadable answer → not approved
    • IfCopy QA Approved?yes → Record Copy QA Approvedno → Record Copy QA Rejected
    • PostgresRecord Copy QA ApprovedAI review stored · approval pending→ Notify Approval Pending
    • PostgresRecord Copy QA RejectedIssues stored · approval pending→ Notify Approval Pending
  6. 06

    Human approval

    A person

    • E-mail · disabledNotify Approval PendingBuilt · off until an e-mail credential is set→ waits for a person

Credits

AI workflow design and development using n8n and connected services.

n8n · Claude Sonnet · fal.ai (FLUX schnell, Kling) · Google Sheets · Postgres

Status: designed and implemented, not yet deployed — the workflow is not activated, so no generated output is shown.

Agne Paliulyte,

AI & automation Product design Digital experiences Creative direction

Short on time? Start with the AI workAI Content Engine →Vehicle-to-Market →