An n8n workflow that turns any article URL into a clean Arabic summary, using a planner → checker → writer → checker loop of four LLM agents that keep revising each other until the output passes review.
Chat trigger (URL)
└─ HTTP Request fetch the page
└─ Extract Article Text (CSS selector `body`, cleaned)
└─ Planner builds {title, main_idea, key_points[]}
└─ Checker-P reviews the plan → Plan OK?
├─ no → back to Planner with notes
└─ yes → Writer writes the summary
└─ Checker-W reviews the draft → Draft OK?
├─ no → back to Writer with notes
└─ yes → Final Output
Every agent is paired with a Structured Output Parser, so each step emits strict JSON
rather than free text. The checkers return {ok, notes}; when ok is false the notes are
fed back into the previous agent and $runIndex is used to keep track of the attempt number.
| Node | Role |
|---|---|
Planner |
extracts title, main idea, key points |
Checker-P |
reviews the plan, returns notes |
Writer |
writes the final Arabic summary |
Checker-W |
reviews the draft, returns notes |
Final Output |
shapes the response returned to the chat |
All four agents run on Groq chat models (@n8n/n8n-nodes-langchain.lmChatGroq).
- n8n (self-hosted or cloud) with the LangChain nodes installed
- A Groq API credential in n8n named
Groq account
- In n8n: Workflows → Import from File
- Pick
Article_Reader_Multi_Agent.json - Open any of the four Groq Chat Model nodes and select your Groq credential
- Activate, then open the chat and send an article URL
- Only the first 3000 characters of the article are sent to the Planner, to stay inside the context window. Raise that slice in the Planner prompt if your model allows it.
- The retry loops are bounded by the
Plan OK?/Draft OK?IF nodes — if a checker never returnsok: true, the loop keeps running, so keep an eye on execution count while tuning prompts.
MIT