See llms.txt for all machine-readable content.
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 agencies. Based in New York City, we specialize in custom software development, web applications, and digital transformation solutions. If you need assistance implementing this workflow or have questions about content management solutions, please reach out to our team.
This workflow automates the end-to-end creation of a structured knowledge-base article from a simple chat prompt:
flowchart LR
A[Webhook: Chat Trigger] --> B[AI Writer Agent]
B --> C[HTTP Request: Perplexity Content]
C --> D[Function: Format Output & Citations]
D --> E[Loop Start: Initialize Count]
E --> F[AI Editor Agent]
F --> G{action == "rewrite"?}
G -- yes --> H[Function: Merge Improvements]
H --> I[Increment Count] --> F
G -- no --> J[Stop Loop]
J --> K[HTTP Request: Create draft in Contentful]
Type: HTTP Webhook (POST /webhook/knowledge-article)
Payload:
{
"chatInput": "What topics should I write about?"
}
Purpose: Kicks off the workflow on that chat prompt.
Inputs: chatInput or existing article JSON
Outputs:
{
"title": "...",
"slug": "...",
"category.id": "...",
"description": "...",
"keywords": [...],
"content": "...",
"metaTitle": "...",
"metaDescription": "...",
"readingTime": 5,
"difficulty": "intermediate"
}
Purpose: Generates the article skeleton (metadata + initial content).
Method: POST
URL: https://api.perplexity.ai/research
Body:
{
"model": "sonar-deep-research",
"query": "{{ $json.title }}",
"length": 1000
}
Purpose: Retrieves a long-form, deeply researched draft for the article body.
Logic:
action: "rewrite" + improvements: [...]action: "submit"Method: PUT
URL: https://api.contentful.com/spaces/{space}/environments/master/entries
Headers:
Body: Maps JSON → Contentful entry fields
Outcome: Creates the finalized article as a Contentful draft.
Writer vs. Editor agents isolate creative drafting from quality review.
Counter + action flags prevent infinite retries.
Swap in different research APIs or CMS targets with minimal changes.
Ensures predictable input/output for each node.
Import and publish your separate Contentful companion #4078, then select it in Execute Workflow. Connect OpenAI and a Perplexity Header Auth credential with Authorization set to Bearer followed by your key. Configure your Contentful space, environment, content type and management credential in your purchased #4078 copy. This workflow runs up to three editorial passes and creates one draft entry in Contentful. Review the entry in Contentful before publishing it.