{ "kind": "open-flow-workflow", "version": 1, "name": "Blog Writing Pipeline", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_dce95ee0636ff7cf": { "name": "Blog brief", "kind": "start", "inputDefs": [ { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "topic" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "tone" }, { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "word_count" } ] }, "n_405eb0cec8112128": { "inputs": { "topic": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dce95ee0636ff7cf", "output": "topic" } ] } }, "name": "Research topic", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "items": { "type": "object" }, "type": "array" }, "nullable": true, "handle": "messages", "value": null }, { "jsonSchema": { "items": { "type": "object" }, "minItems": 1, "type": "array" }, "nullable": false, "handle": "template", "value": [ { "role": "user", "content": "You are a professional blog researcher. Research the topic: \"{{topic}}\" and provide 5 key points with supporting evidence. Format as a numbered list with brief explanations. Be factual and cite real concepts." } ] }, { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "model", "value": { "model": "llama3:8b", "temperature": 0.3, "max_tokens": 1000 } }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "topic" } ], "outputs": [ { "description": "Generated response.", "jsonSchema": { "type": "string" }, "nullable": false, "handle": "output" } ], "name": "Research topic", "executor": { "kind": "llm", "mode": "chat" } } }, "n_284f66fa9b3afe17": { "inputs": { "research": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_405eb0cec8112128", "output": "output" } ] }, "topic": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dce95ee0636ff7cf", "output": "topic" } ] }, "word_count": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dce95ee0636ff7cf", "output": "word_count" } ] } }, "name": "Create outline", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "items": { "type": "object" }, "type": "array" }, "nullable": true, "handle": "messages", "value": null }, { "jsonSchema": { "items": { "type": "object" }, "minItems": 1, "type": "array" }, "nullable": false, "handle": "template", "value": [ { "role": "user", "content": "You are a blog outline creator. Based on this research:\n\n{{research}}\n\nCreate a detailed blog outline for the topic: \"{{topic}}\"\n\nInclude: Title, H2 sections, key points under each, and a conclusion. Target {{word_count}} words." } ] }, { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "model", "value": { "model": "llama3:8b", "temperature": 0.4, "max_tokens": 1000 } }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "research" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "topic" }, { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "word_count" } ], "outputs": [ { "description": "Generated response.", "jsonSchema": { "type": "string" }, "nullable": false, "handle": "output" } ], "name": "Create outline", "executor": { "kind": "llm", "mode": "chat" } } }, "n_57eb7c367a322325": { "inputs": { "outline": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_284f66fa9b3afe17", "output": "output" } ] }, "tone": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dce95ee0636ff7cf", "output": "tone" } ] }, "word_count": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dce95ee0636ff7cf", "output": "word_count" } ] } }, "name": "Write draft", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "items": { "type": "object" }, "type": "array" }, "nullable": true, "handle": "messages", "value": null }, { "jsonSchema": { "items": { "type": "object" }, "minItems": 1, "type": "array" }, "nullable": false, "handle": "template", "value": [ { "role": "user", "content": "You are a professional blog writer. Write a complete blog post following this outline:\n\n{{outline}}\n\nRequirements:\n- Tone: {{tone}}\n- Target length: {{word_count}} words\n- Use markdown formatting (## for headings)\n- Include a compelling introduction and conclusion\n- Add practical tips and examples\n- Write for SEO (use keywords naturally)" } ] }, { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "model", "value": { "model": "llama3:8b", "temperature": 0.7, "max_tokens": 4000 } }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "outline" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "tone" }, { "jsonSchema": { "type": "integer", "minimum": 1 }, "nullable": false, "handle": "word_count" } ], "outputs": [ { "description": "Generated response.", "jsonSchema": { "type": "string" }, "nullable": false, "handle": "output" } ], "name": "Write draft", "executor": { "kind": "llm", "mode": "chat" } } }, "n_6123d4444716e776": { "inputs": { "draft": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_57eb7c367a322325", "output": "output" } ] } }, "name": "Edit and polish", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "items": { "type": "object" }, "type": "array" }, "nullable": true, "handle": "messages", "value": null }, { "jsonSchema": { "items": { "type": "object" }, "minItems": 1, "type": "array" }, "nullable": false, "handle": "template", "value": [ { "role": "user", "content": "You are a professional editor. Edit and improve this blog post for clarity, grammar, flow, and SEO. Fix any issues and make it publication-ready. Return the complete edited post in markdown.\n\nOriginal post:\n\n{{draft}}" } ] }, { "jsonSchema": { "type": "object" }, "nullable": false, "handle": "model", "value": { "model": "llama3:8b", "temperature": 0.3, "max_tokens": 4000 } }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "draft" } ], "outputs": [ { "description": "Generated response.", "jsonSchema": { "type": "string" }, "nullable": false, "handle": "output" } ], "name": "Edit and polish", "executor": { "kind": "llm", "mode": "chat" } } }, "n_46d653be9e805b30": { "inputs": { "topic": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_dce95ee0636ff7cf", "output": "topic" } ] }, "content": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_6123d4444716e776", "output": "output" } ] } }, "name": "Prepare edited post", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "topic" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "content" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "topic" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "final_post" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "generated_at" } ], "name": "Prepare edited post", "moduleId": "n_58e7a508d841882a", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_6430955c37212a60": { "name": "Edited blog post", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "topic" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "final_post" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "generated_at" } ], "outputMappings": { "topic": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_46d653be9e805b30", "output": "topic" } ] }, "final_post": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_46d653be9e805b30", "output": "final_post" } ] }, "generated_at": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_46d653be9e805b30", "output": "generated_at" } ] } } } }, "edges": [ { "source": "n_dce95ee0636ff7cf", "target": "n_405eb0cec8112128" }, { "source": "n_405eb0cec8112128", "target": "n_284f66fa9b3afe17" }, { "source": "n_284f66fa9b3afe17", "target": "n_57eb7c367a322325" }, { "source": "n_57eb7c367a322325", "target": "n_6123d4444716e776" }, { "source": "n_6123d4444716e776", "target": "n_46d653be9e805b30" }, { "source": "n_46d653be9e805b30", "target": "n_6430955c37212a60" } ] } }, "modules": { "n_58e7a508d841882a": { "name": "Prepare edited post", "imports": [], "source": "export default function blogResult({ topic, content }) {\n if (typeof content !== 'string' || !content.trim()) throw new Error('The editor returned an empty blog post.');\n return { topic, final_post: content, generated_at: new Date().toISOString() };\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }