WORKFLOW · N8N
AI Blog Writer Pipeline (Ollama)
Prompts👁 0
WORKFLOW JSON
{
"meta": {
"templateCredsSetupCompleted": true
},
"name": "AI Blog Writer Pipeline (Ollama)",
"tags": [
{
"name": "AI"
},
{
"name": "Ollama"
},
{
"name": "Content"
},
{
"name": "Blog"
}
],
"nodes": [
{
"id": "trigger-1",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"position": [
240,
300
],
"parameters": {},
"typeVersion": 1
},
{
"id": "set-input",
"name": "Set Blog Parameters",
"type": "n8n-nodes-base.set",
"position": [
460,
300
],
"parameters": {
"assignments": {
"assignments": [
{
"id": "topic",
"name": "topic",
"type": "string",
"value": "How to Self-Host AI Models with Ollama"
},
{
"id": "tone",
"name": "tone",
"type": "string",
"value": "professional but conversational"
},
{
"id": "word_count",
"name": "word_count",
"type": "string",
"value": "1500"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "research",
"name": "1. Research Topic (Ollama)",
"type": "n8n-nodes-base.httpRequest",
"position": [
680,
300
],
"parameters": {
"url": "http://localhost:11434/api/generate",
"options": {
"timeout": 120000
},
"jsonBody": "={{ JSON.stringify({ model: 'llama3:8b', prompt: 'You are a professional blog researcher. Research the topic: \"' + $json.topic + '\" and provide 5 key points with supporting evidence. Format as a numbered list with brief explanations. Be factual and cite real concepts.', stream: false, options: { temperature: 0.3, num_predict: 1000 } }) }}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "outline",
"name": "2. Create Outline (Ollama)",
"type": "n8n-nodes-base.httpRequest",
"position": [
900,
300
],
"parameters": {
"url": "http://localhost:11434/api/generate",
"options": {
"timeout": 120000
},
"jsonBody": "={{ JSON.stringify({ model: 'llama3:8b', prompt: 'You are a blog outline creator. Based on this research:\\n\\n' + JSON.parse($json.data).response + '\\n\\nCreate a detailed blog outline for the topic: \"' + $('Set Blog Parameters').item.json.topic + '\"\\n\\nInclude: Title, H2 sections, key points under each, and a conclusion. Target ' + $('Set Blog Parameters').item.json.word_count + ' words.', stream: false, options: { temperature: 0.4, num_predict: 1000 } }) }}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "draft",
"name": "3. Write Draft (Ollama)",
"type": "n8n-nodes-base.httpRequest",
"position": [
1120,
300
],
"parameters": {
"url": "http://localhost:11434/api/generate",
"options": {
"timeout": 300000
},
"jsonBody": "={{ JSON.stringify({ model: 'llama3:8b', prompt: 'You are a professional blog writer. Write a complete blog post following this outline:\\n\\n' + JSON.parse($json.data).response + '\\n\\nRequirements:\\n- Tone: ' + $('Set Blog Parameters').item.json.tone + '\\n- Target length: ' + $('Set Blog Parameters').item.json.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)', stream: false, options: { temperature: 0.7, num_predict: 4000 } }) }}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "edit",
"name": "4. Edit & Polish (Ollama)",
"type": "n8n-nodes-base.httpRequest",
"position": [
1340,
300
],
"parameters": {
"url": "http://localhost:11434/api/generate",
"options": {
"timeout": 300000
},
"jsonBody": "={{ JSON.stringify({ model: 'llama3:8b', prompt: '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' + JSON.parse($json.data).response, stream: false, options: { temperature: 0.3, num_predict: 4000 } }) }}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "output",
"name": "Final Output",
"type": "n8n-nodes-base.set",
"position": [
1560,
300
],
"parameters": {
"assignments": {
"assignments": [
{
"id": "final_post",
"name": "final_post",
"type": "string",
"value": "={{ JSON.parse($json.data).response }}"
},
{
"id": "topic",
"name": "topic",
"type": "string",
"value": "={{ $('Set Blog Parameters').item.json.topic }}"
},
{
"id": "generated_at",
"name": "generated_at",
"type": "string",
"value": "={{ new Date().toISOString() }}"
}
]
}
},
"typeVersion": 3.4
}
],
"settings": {
"executionOrder": "v1"
},
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "Set Blog Parameters",
"type": "main",
"index": 0
}
]
]
},
"Set Blog Parameters": {
"main": [
[
{
"node": "1. Research Topic (Ollama)",
"type": "main",
"index": 0
}
]
]
},
"3. Write Draft (Ollama)": {
"main": [
[
{
"node": "4. Edit & Polish (Ollama)",
"type": "main",
"index": 0
}
]
]
},
"4. Edit & Polish (Ollama)": {
"main": [
[
{
"node": "Final Output",
"type": "main",
"index": 0
}
]
]
},
"1. Research Topic (Ollama)": {
"main": [
[
{
"node": "2. Create Outline (Ollama)",
"type": "main",
"index": 0
}
]
]
},
"2. Create Outline (Ollama)": {
"main": [
[
{
"node": "3. Write Draft (Ollama)",
"type": "main",
"index": 0
}
]
]
}
}
}RELATED WORKFLOWS
COMMENTS
No comments yet — be the first.
