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 takes a JSON article payload, splits its markdown content into logical chunks, converts each chunk into Contentful Rich Text JSON via an AI agent, merges the resulting rich text nodes back into a single document, formats the entire entry according to Contentful's field schema, and finally publishes it to Contentful.
##
-delimited chunksflowchart LR
A[When Executed by Another Workflow] --> B[Split by Headings]
B --> C[Markdown to Contentful format]
C --> D[Combine Rich Text Objects]
D --> E[Merge1]
E --> F[Format1]
F --> G[Create newly formatted Contentful Entry]
Type: Execute Workflow Trigger
Input Example:
Purpose: Receives the JSON payload from the upstream workflow.
Type: Code
Logic:
Type: LangChain Agent (+ OpenAI Chat model)
System Prompt:
User Prompt:
Here is the markdown content to convert:
{{ $json.contentChunk }}
Purpose: Converts each markdown chunk into an array of rich-text nodes.
Type: Code
Logic:
Type: Merge
Purpose: Joins the original item (with metadata) and the combined rich-text document into a single data stream.
Type: Code
Logic:
Type: HTTP Request
Method: POST
URL:
https://api.contentful.com/spaces
Headers:
Body: The formatted fields object produced by the previous node
Purpose: Publishes the new entry with rich-text content to Contentful.
Splitting by headings prevents AI context limits and keeps conversions modular.
Enforcing nodeType, data, and content structure avoids validation errors on Contentful.
Separating "combine AI outputs" and "format entry" keeps transformations clear and testable.
Uses explicit versioning and content type headers to ensure correct entry creation.