Orchestrate iterative content drafting with research, writer and reviewer flows

Go to Workflow
0 views
Built by Elvis Sarvia Elvis Sarvia
Created on June 05, 2026

Description

Quick overview
This webhook-based orchestrator runs a research–write–review content pipeline by calling three n8n subworkflows and looping revisions until a quality score threshold is met or the maximum revision count is reached.

How it works
Receives a POST request on a webhook with a content topic, brief, and optional quality and revision settings.
Normalizes the request into a single pipeline state object, including a request ID, quality threshold, and revision counters.
Calls a Research subworkflow to generate background notes and attaches the results to the pipeline state.
Calls a Writer subworkflow to produce a draft (or revise the previous draft using reviewer feedback on subsequent iterations).
Calls a Reviewer subworkflow to score the draft and return issues and revision notes.
Compares the reviewer’s overall score to the quality threshold and either loops back for another revision or finalizes the output when approved or max revisions is reached.
Returns a JSON response to the webhook caller containing the final draft, scores, issues, revision count, and pass/fail status.

Setup
Import and save the Research, Writer, and Reviewer subworkflows, then select them in the three Execute Workflow steps so the orchestrator can call them.
Configure the LLM/chat model credentials inside each subworkflow (Research, Writer, and Reviewer) so they can generate and judge content.
Copy the webhook URL and configure your client to POST JSON including topic and brief (optionally qualityThreshold and maxRevisions) to start the pipeline.

Nodes Used (1)

Code
n8n-nodes-base.code