The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Fun Facts AI Storyteller",
"nodes": [
{
"parameters": {},
"id": "node-1",
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
240,
300
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.groq.com/openai/v1/chat/completions",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "<redacted-credential>"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\"model\":\"llama-3.3-70b-versatile\",\"temperature\":0.9,\"messages\":[{\"role\":\"system\",\"content\":\"You are a viral fun facts Instagram creator. Generate ONE mind-blowing fun fact. Return ONLY valid JSON: {\\\"title\\\":\\\"catchy title\\\",\\\"narration\\\":\\\"60-90 second narration script\\\",\\\"scenes\\\":[{\\\"scene_number\\\":1,\\\"image_prompt\\\":\\\"ultra realistic cinematic 8k description no text\\\",\\\"caption\\\":\\\"short overlay text\\\"}],\\\"instagram_caption\\\":\\\"caption with emojis hashtags\\\"}. Generate 5 scenes.\"},{\"role\":\"user\",\"content\":\"Generate a viral fun fact about science, nature, space, animals or psychology.\"}]}",
"options": {
"timeout": 30000
}
},
"id": "node-2",
"name": "Groq Generate Script",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
500,
300
]
},
{
"parameters": {
"jsCode": "const r=$input.first().json;const c=r.choices[0].message.content;let f;try{let x=c.trim();if(x.startsWith('```')){x=x.replace(/^```(?:json)?\\n?/,'').replace(/\\n?```$/,'');}f=JSON.parse(x);}catch(e){throw new Error('Parse: '+e.message);}return f.scenes.map((s,i)=>({json:{scene_number:s.scene_number||i+1,image_prompt:s.image_prompt,caption:s.caption,title:f.title,narration:f.narration,instagram_caption:f.instagram_caption,total_scenes:f.scenes.length}}));"
},
"id": "node-3",
"name": "Parse Scenes",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
760,
300
]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "node-4",
"name": "Loop Over Scenes",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
1020,
300
]
},
{
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ encodeURIComponent($json[\"image_prompt\"] + \", ultra realistic 8k cinematic vertical 9:16\") }}?width=1080&height=1920&nologo=true&model=flux",
"options": {
"timeout": 60000,
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"id": "node-5",
"name": "Pollinations Image",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1280,
400
]
},
{
"parameters": {
"aggregate": "aggregateAllItemData",
"options": {}
},
"id": "node-6",
"name": "Aggregate Scenes",
"type": "n8n-nodes-base.aggregate",
"typeVersion": 1,
"position": [
1280,
200
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.elevenlabs.io/v1/text-to-speech/21m00Tcm4TlvDq8ikWAM",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "xi-api-key",
"value": "sk_7235ad80705bdbcf558bd29cab93054fc44d85c84bf69056"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\"text\":\"{{ $json.data[0].json.narration }}\",\"model_id\":\"eleven_multilingual_v2\",\"voice_settings\":{\"stability\":0.5,\"similarity_boost\":0.75}}",
"options": {
"timeout": 60000,
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"id": "node-7",
"name": "ElevenLabs Voice",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1540,
200
]
},
{
"parameters": {
"jsCode": "const d=$input.first().json;const arr=d.data||[];const first=(arr[0]||{}).json||{};return [{json:{status:'SUCCESS',title:first.title||'Fun Fact',narration:first.narration||'',instagram_caption:first.instagram_caption||'',message:'Done! Download images and audio. Combine in CapCut to make your Reel!'}}];"
},
"id": "node-8",
"name": "Summary",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1800,
200
]
}
],
"connections": {
"Manual Trigger": {
"main": [
[
{
"node": "Groq Generate Script",
"type": "main",
"index": 0
}
]
]
},
"Groq Generate Script": {
"main": [
[
{
"node": "Parse Scenes",
"type": "main",
"index": 0
}
]
]
},
"Parse Scenes": {
"main": [
[
{
"node": "Loop Over Scenes",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Scenes": {
"main": [
[
{
"node": "Aggregate Scenes",
"type": "main",
"index": 0
}
],
[
{
"node": "Pollinations Image",
"type": "main",
"index": 0
}
]
]
},
"Pollinations Image": {
"main": [
[
{
"node": "Loop Over Scenes",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Scenes": {
"main": [
[
{
"node": "ElevenLabs Voice",
"type": "main",
"index": 0
}
]
]
},
"ElevenLabs Voice": {
"main": [
[
{
"node": "Summary",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Fun Facts AI Storyteller. Uses httpRequest. Event-driven trigger; 8 nodes.
Source: https://gist.github.com/konankirajesh7-raj/e3c6ae5d322d5d5a91bf0cd6cdfd098e — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow listens for an “Approved” label on a Trello card, reads the AI draft bookkeeping JSON from card comments, and posts the corresponding transaction to Xero. It then adds a Xero deep link b
02_LLM_Pipeline v1.0. Uses executeWorkflowTrigger, httpRequest, seaTable. Event-driven trigger; 65 nodes.
This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t
[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.
[](https://youtu.be/c7yCZhmMjtI)