π¬ Draft and revise technical articles with OpenRouter in a content pipeline
β‘ 44 views Β· π¬ Content Creation & Video
Description
Quick Overview
This subworkflow is triggered by a parent content pipeline, uses OpenRouter (via an AI Writer Agent) to draft or revise a technical article from a brief, research notes, and optional reviewer feedback, and returns the updated pipeline state with the current draft and word count.
How it works
- Receives input from a parent workflow containing the brief, research notes, and optionally a previous draft plus reviewer feedback.
- Sends the brief, research JSON, and any revision context to an AI Writer Agent backed by OpenRouter to generate a fresh draft or revise the prior draft.
- Parses the agentβs JSON response, extracts the draft text and word count (or calculates it if missing), and flags whether the output is a revision.
- Merges the extracted fields back into the original input and returns the updated state (including
currentDraft) to the parent workflow.
Setup
- Add an OpenRouter API credential and select it for the OpenRouter chat model used by the Writer Agent.
- Ensure the parent workflow passes the expected fields (for example
brief,research, and optionallypreviousDraftandfeedbackNotes) when calling this subworkflow. - Update the Writer Agent system prompt if you need a different word-count target, brand voice, or formatting requirements.
π Nodes Used
Execute Workflow Trigger, AI Agent, OpenRouter Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File