Generate knowledge base articles with GPT & Perplexity AI for Contentful CMS
Needs changesWhat this workflow does
This AI workflow has 19 nodes and runs when a chat message arrives. Along the way it connects OpenAI Chat Model.
How it runs
Trigger: When a chat message arrives.
- Initialize Count (Edit Fields (Set)): sets or maps fields
- AI Writer Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- Increment Count (Function): runs custom JavaScript (legacy Function node)
- Create Perplexity Content (HTTP Request): calls an HTTP API
- JSON.parse (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
- Format Perplexity Output & Add Citations (Code): runs custom JavaScript code
- Format (Code): runs custom JavaScript code
- AI Editor Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Accept and Publish)
- Check Limit (If): checks a condition and branches into true / false
…plus 4 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- AI Agent v1 (old agent modes) in AI Writer Agent (v1.7), AI Editor Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Function (legacy) in Increment Count: replace with Code node, mode 'Run Once for All Items'.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2025 — 19% of 2025 templates need changes for 3.0. See how template age affects 3.0 readiness →
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Writer Agent (v1.7), AI Editor Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
| Function (legacy) Increment Count | Code node, mode 'Run Once for All Items' |
Nodes used (12)
- HTTP Request
n8n-nodes-base.httpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge - Edit Fields (Set)
n8n-nodes-base.set - Function
n8n-nodes-base.function - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Execute Sub-workflow
n8n-nodes-base.executeWorkflow
From the author
Workflow: Auto Knowledge Base Article Generator ⚡ About the Creators This workflow was created by Varritech Technologies, an innovative agency that leverages AI to engineer, design, and deliver software development projects 500% faster than traditional…