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": "IG Reels - CORE (n8n 1.110.1)",
"nodes": [
{
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 9,
"minute": 0
}
],
"timezone": "Asia/Taipei"
}
},
"name": "Cron - 09:00",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
-1380,
-20
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://api.openai.com/v1/chat/completions",
"jsonParameters": true,
"sendHeaders": true,
"headerParametersJson": "{\"Authorization\":\"Bearer {{$env.OPENAI_API_KEY}}\",\"Content-Type\":\"application/json\"}",
"bodyParametersJson": "{\n \"model\": \"gpt-4o-mini\",\n \"response_format\": {\"type\": \"json_object\"},\n \"messages\": [\n {\"role\": \"system\", \"content\": \"\u4f60\u662f\u77ed\u5f71\u7247\u8173\u672c\u7de8\u5287\u3002\u8f38\u51fa JSON\uff1a{\\\\\"title\\\\\":string,\\\\\"caption\\\\\":string,\\\\\"script\\\\\":string[]}\u3002script \u70ba 6~8 \u884c\uff0c\u6bcf\u884c 5~12 \u5b57\uff0c\u6574\u9ad4\u7bc0\u594f\u63a7\u5236 40~44 \u79d2\uff0c\u8a9e\u6c23\u5c08\u696d\u89aa\u5207\uff0c\u7e41\u9ad4\u4e2d\u6587\uff0c\u907f\u514d\u8a87\u5927\u7528\u8a9e\u3002\"},\n {\"role\": \"user\", \"content\": \"\u4e3b\u984c\uff1aAI \u81ea\u52d5\u5316\u5c0f\u6280\u5de7\u3002\u7522\u51fa\u4e00\u500b\u53ef\u5728 IG Reels \u4f7f\u7528\u7684\u8173\u672c\u8207\u8cbc\u6587\u6587\u6848\u3002\"}\n ]\n}"
},
"name": "AI - Script & Caption",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
-1160,
-20
]
},
{
"parameters": {
"functionCode": "const c=$json.choices?.[0]?.message?.content||'{}';let o={};try{o=JSON.parse(c);}catch(e){o={};}const title=String(o.title||'\u4eca\u65e5\u91cd\u9ede').trim();const caption=String(o.caption||'\u6bcf\u5929\u4e00\u5247\u81ea\u52d5\u5316\u5c0f\u77e5\u8b58').trim();const lines=Array.isArray(o.script)?o.script.filter(s=>String(s).trim()).slice(0,8):['\u5b78\u6703\u4e00\u500b\u81ea\u52d5\u5316\u6280\u5de7','\u66ff\u4f60\u6bcf\u5929\u7701\u4e0b\u6642\u9593','\u5c08\u6ce8\u771f\u6b63\u91cd\u8981\u7684\u4e8b'];return[{json:{title,caption,lines}}];"
},
"name": "Parse AI JSON",
"type": "n8n-nodes-base.function",
"typeVersion": 2,
"position": [
-980,
-20
]
},
{
"parameters": {
"functionCode": "const lines=$json.lines||[];const intro=3,outro=2,bodyMax=45-intro-outro;const n=Math.max(1,lines.length);const base=Math.floor(bodyMax/n);let leftover=bodyMax-base*n,t=intro;const plan=[];for(let i=0;i<n;i++){const dur=base+(leftover>0?1:0);if(leftover>0)leftover--;plan.push({text:String(lines[i]).trim(),start:t,length:dur});t+=dur;}return[{json:{...$json,intro,outro,plan}}];"
},
"name": "Build Timeline Plan",
"type": "n8n-nodes-base.function",
"typeVersion": 2,
"position": [
-800,
-20
]
},
{
"parameters": {
"functionCode": "const title=$json.title;const caption=$json.caption;const plan=$json.plan||[];const introClip={asset:{type:'title',text:title,style:'minimal'},start:0,length:$json.intro,position:'center',effect:'zoomIn'};const outroStart=plan.length?plan[plan.length-1].start+plan[plan.length-1].length:$json.intro;const outroClip={asset:{type:'title',text:'\u8ffd\u8e64\u7372\u5f97\u66f4\u591a AI \u5c0f\u6280\u5de7',style:'minimal'},start:outroStart,length:$json.outro,position:'center',effect:'zoomOut'};const textClips=plan.map(p=>({asset:{type:'title',text:p.text,style:'bold'},start:p.start,length:p.length,position:'bottom',effect:'fade'}));const bgClip={asset:{type:'solid',color:'#0e0f13'},start:0,length:45};const timeline={background:'#0e0f13',tracks:[{clips:[bgClip]},{clips:[introClip,...textClips,outroClip]}]};const body={timeline,output:{format:'mp4',aspectRatio:'9:16',resolution:'high'}};return[{json:{caption,shotstackBody:body}}];"
},
"name": "Shotstack Body",
"type": "n8n-nodes-base.function",
"typeVersion": 2,
"position": [
-620,
-20
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://api.shotstack.io/stage/render",
"jsonParameters": true,
"sendHeaders": true,
"headerParametersJson": "{\"x-api-key\":\"{{$env.SHOTSTACK_API_KEY}}\",\"Content-Type\":\"application/json\"}",
"bodyParametersJson": "={{ $json[\"shotstackBody\"] }}"
},
"name": "Shotstack - Render",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
-420,
-20
]
},
{
"parameters": {
"amount": 25,
"unit": "seconds"
},
"name": "Wait 25s",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
-240,
-20
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "GET",
"url": "={{$json.response?.id ? 'https://api.shotstack.io/stage/render/' + $json.response.id : ''}}",
"jsonParameters": false,
"sendHeaders": true,
"headerParametersJson": "{\"x-api-key\":\"{{$env.SHOTSTACK_API_KEY}}\"}"
},
"name": "Shotstack - Poll",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
-60,
-20
]
},
{
"parameters": {
"functionCode": "const status=String($json.status||'').toLowerCase();const url=$json.url||$json.output?.url||'';if(status!=='done'||!url){return[{json:{ok:false,reason:'\u6e32\u67d3\u672a\u5b8c\u6210\u6216\u7121URL',status,url}}];}return[{json:{ok:true,videoUrl:url}}];"
},
"name": "Render Result",
"type": "n8n-nodes-base.function",
"typeVersion": 2,
"position": [
120,
-20
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{$json[\"ok\"]===true}}",
"operation": "equal",
"value2": true
}
]
}
},
"name": "IF Render OK?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
300,
-20
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://graph.facebook.com/v20.0/{{$env.IG_USER_ID}}/media",
"jsonParameters": true,
"sendHeaders": true,
"headerParametersJson": "{\"Authorization\":\"Bearer {{$env.META_ACCESS_TOKEN}}\",\"Content-Type\":\"application/json\"}",
"bodyParametersJson": "{\"media_type\":\"VIDEO\",\"video_url\":\"{{$json.videoUrl}}\",\"caption\":\"{{$node[\\\"Shotstack Body\\\"].json.caption}}\"}"
},
"name": "IG - Create Container",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
520,
-100
]
},
{
"parameters": {
"amount": 5,
"unit": "seconds"
},
"name": "Wait 5s",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
720,
-100
]
},
{
"parameters": {
"authentication": "none",
"requestMethod": "POST",
"url": "https://graph.facebook.com/v20.0/{{$env.IG_USER_ID}}/media_publish",
"jsonParameters": true,
"sendHeaders": true,
"headerParametersJson": "{\"Authorization\":\"Bearer {{$env.META_ACCESS_TOKEN}}\",\"Content-Type\":\"application/json\"}",
"bodyParametersJson": "{\"creation_id\":\"{{$node[\\\"IG - Create Container\\\"].json.id}}\"}"
},
"name": "IG - Publish",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
920,
-100
]
}
],
"connections": {
"Cron - 09:00": {
"main": [
[
{
"node": "AI - Script & Caption",
"type": "main",
"index": 0
}
]
]
},
"AI - Script & Caption": {
"main": [
[
{
"node": "Parse AI JSON",
"type": "main",
"index": 0
}
]
]
},
"Parse AI JSON": {
"main": [
[
{
"node": "Build Timeline Plan",
"type": "main",
"index": 0
}
]
]
},
"Build Timeline Plan": {
"main": [
[
{
"node": "Shotstack Body",
"type": "main",
"index": 0
}
]
]
},
"Shotstack Body": {
"main": [
[
{
"node": "Shotstack - Render",
"type": "main",
"index": 0
}
]
]
},
"Shotstack - Render": {
"main": [
[
{
"node": "Wait 25s",
"type": "main",
"index": 0
}
]
]
},
"Wait 25s": {
"main": [
[
{
"node": "Shotstack - Poll",
"type": "main",
"index": 0
}
]
]
},
"Shotstack - Poll": {
"main": [
[
{
"node": "Render Result",
"type": "main",
"index": 0
}
]
]
},
"Render Result": {
"main": [
[
{
"node": "IF Render OK?",
"type": "main",
"index": 0
}
]
]
},
"IF Render OK?": {
"main": [
[
{
"node": "IG - Create Container",
"type": "main",
"index": 0
}
]
]
},
"IG - Create Container": {
"main": [
[
{
"node": "Wait 5s",
"type": "main",
"index": 0
}
]
]
},
"Wait 5s": {
"main": [
[
{
"node": "IG - Publish",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"timezone": "Asia/Taipei"
},
"active": false
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
IG Reels - CORE (n8n 1.110.1). Uses httpRequest. Scheduled trigger; 13 nodes.
Source: https://gist.github.com/a84235908423590-sys/973d3fde0cbf91d9da92a2c0fbd07d95 — 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.
As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o
This workflow is an improvement of this workflow by Greg Brzezinka.
N8N-Workflow-Github-Manager. Uses github, httpRequest, n8n. Scheduled trigger; 38 nodes.
This workflow uses KlickTipp community nodes, available for self-hosted n8n instances only.
This workflow acts as an automated engagement bot. It sends a Direct Message (DM) with a link or resource to any follower who replies to your post with a specific target keyword.