This workflow corresponds to n8n.io template #15364 — we link there as the canonical source.
This workflow follows the Chainllm → Google Sheets recipe pattern — see all workflows that pair these two integrations.
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 →
{
"id": "YSNgbFkI26v0HR3w",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Auto-Instagram-post",
"tags": [],
"nodes": [
{
"id": "2287160e-776d-42ea-8f76-98c3bfb15bfd",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
208,
0
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 13,
"triggerAtMinute": 10
}
]
}
},
"typeVersion": 1.3
},
{
"id": "e0776d1b-e888-46ea-8799-846854b1ad73",
"name": "Generate an image",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
1008,
0
],
"parameters": {
"prompt": "={{ Object.values(JSON.parse($node[\"Generate-Prompt-and-Caption\"].json.text))[0] }}",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash-image",
"cachedResultName": "models/gemini-2.5-flash-image (Nano Banana)"
},
"options": {},
"resource": "image"
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.1
},
{
"id": "c4f13b1d-e038-40d8-9921-50c28c7a5542",
"name": "Upload a File",
"type": "n8n-nodes-uploadtourl.uploadToUrl",
"position": [
1264,
0
],
"parameters": {},
"credentials": {
"uploadToUrlApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "e5762c2b-ec6f-43b4-a60e-9b753d02a55f",
"name": "Publish",
"type": "@mookielianhd/n8n-nodes-instagram.instagram",
"position": [
1504,
0
],
"parameters": {
"node": "17841477181716596",
"caption": "={{ Object.values(JSON.parse($node[\"Generate-Prompt-and-Caption\"].json.text))[1] }}",
"imageUrl": "={{ $json.url }}",
"additionalFields": {}
},
"credentials": {
"instagramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "2062a43c-d9e2-470b-8598-dacbf446a229",
"name": "Update row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
1728,
0
],
"parameters": {
"columns": {
"value": {
"Prompt": "={{ Object.values(JSON.parse($node[\"Generate-Prompt-and-Caption\"].json.text))[0] }}",
"Status": "Posted",
"Caption": "={{ Object.values(JSON.parse($node[\"Generate-Prompt-and-Caption\"].json.text))[1] }}",
"Image_URL": "={{ $('Upload a File').item.json.url }}",
"row_number": "={{ $('Get-Ideas').item.json.row_number }}"
},
"schema": [
{
"id": "Idea/Niche",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Idea/Niche",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Prompt",
"type": "string",
"display": true,
"required": false,
"displayName": "Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Caption",
"type": "string",
"display": true,
"required": false,
"displayName": "Caption",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Image_URL",
"type": "string",
"display": true,
"required": false,
"displayName": "Image_URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1db8d4y_pxKDWg7YIpC4qaHEzu9WmhvHJuagK8ou_UNo/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1db8d4y_pxKDWg7YIpC4qaHEzu9WmhvHJuagK8ou_UNo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1db8d4y_pxKDWg7YIpC4qaHEzu9WmhvHJuagK8ou_UNo/edit?usp=drivesdk",
"cachedResultName": "Instagram Posting"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "05f9851e-a36c-439a-b8e1-1178049658e5",
"name": "Get-Ideas",
"type": "n8n-nodes-base.googleSheets",
"position": [
448,
0
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "Ready",
"lookupColumn": "Status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1db8d4y_pxKDWg7YIpC4qaHEzu9WmhvHJuagK8ou_UNo/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1db8d4y_pxKDWg7YIpC4qaHEzu9WmhvHJuagK8ou_UNo",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1db8d4y_pxKDWg7YIpC4qaHEzu9WmhvHJuagK8ou_UNo/edit?usp=drivesdk",
"cachedResultName": "Instagram Posting"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "8b25a3fe-37a7-4b26-bdc3-19ba06dd96ed",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-416
],
"parameters": {
"color": "#E6E6E6",
"width": 448,
"content": "**Workflow Overview**\n**This n8n workflow automatically runs daily at **1:10 PM IST**, picks an idea from a Google Sheet, generates an AI image prompt + Instagram caption, creates the image using Gemini, uploads it, posts it to Instagram, and updates the sheet with the result.**"
},
"typeVersion": 1
},
{
"id": "7118efda-d59f-479b-8278-18f1568e06da",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
656,
176
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-nano",
"cachedResultName": "gpt-4.1-nano"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "05785c5e-4408-48d6-8ffb-12393dae31d7",
"name": "Generate-Prompt-and-Caption",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
672,
0
],
"parameters": {
"text": "=You are a Content Generator. Based on the niche provided, return a flat JSON object.\n\nIdea/Niche: {{ $json['Idea/Niche'] }}\n\nEnsure the prompt is visually distinct for this specific topic and the caption uses relevant emojis and hashtags. Return only the JSON.\n\nDIRECTIONS:\n1. Analyze the 'Idea/Niche' to determine the appropriate aesthetic (e.g., Luxury, Gritty, Minimalist, or Vibrant).\n2. Generate an 'Image Prompt' optimized for high-end AI generators. Include specific camera settings (e.g., 35mm lens), lighting (e.g., volumetric lighting), and textures relevant to that specific niche.\n3. Generate a 'Caption' that matches the tone of the niche (e.g., professional for business, poetic for travel, energetic for fitness).",
"batching": {},
"messages": {
"messageValues": []
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "beb6c797-f4a0-45ab-a511-9511a2dd353b",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
144,
-176
],
"parameters": {
"color": "#BC1515",
"width": 224,
"height": 336,
"content": "## Step 1: Schedule Trigger\n\nFires the entire workflow automatically every day at **1:10 PM IST (13:10)**. No manual trigger is needed.\n"
},
"typeVersion": 1
},
{
"id": "3d7b0421-46ba-4f82-93a4-040fdea5f62d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
384,
-368
],
"parameters": {
"color": "#741B36",
"height": 528,
"content": "\n## Step 2: Get-Ideas\n\n### What it does\nReads rows from the **\"Instagram Posting\"** Google Sheet where the `Status` column equals `\"Ready\"`.\n\n\n### Sheet Columns Read\n- `Idea/Niche` \u2014 The niche topic entered manually by the user (e.g., *Minimalist Home*)\n- `row_number` \u2014 Used later to update the correct row after posting\n\n"
},
"typeVersion": 1
},
{
"id": "04427449-a3bf-4ec2-a7b3-ad1bf1977a14",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
-304
],
"parameters": {
"color": "#6C1178",
"width": 288,
"height": 464,
"content": "## Step 3: Generate-Prompt-and-Caption\n### What it does\nProvides the **GPT-4.1 Nano** language model as the brain for the `Generate-Prompt-and-Caption` Basic LLM node.\nIt Takes the `Idea/Niche` from the Google Sheet and generates two things: **An image prompt** , **An Instagram caption**\n\n"
},
"typeVersion": 1
},
{
"id": "1e3e29c4-1525-49c8-9c6d-3bfce2e59a00",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
944,
-240
],
"parameters": {
"color": "#541FB7",
"height": 400,
"content": "## Step 4: Generate an image\n\n### What it does\nTakes the **Image Prompt** generated by the LLM and uses **Google Gemini 2.5 Flash Image** model to generate the actual image.\n\n"
},
"typeVersion": 1
},
{
"id": "c3e5356f-47c4-4c5f-bfdc-02fb85087132",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1200,
-272
],
"parameters": {
"color": "#0E7770",
"height": 432,
"content": "## Step 5: Upload to URL\n\n### What it does\nUploads the **generated image binary** to a public CDN via the `uploadtourl` service, and returns a **public URL** for the image. This URL is needed for both Instagram publishing and saving to the sheet.\n\n"
},
"typeVersion": 1
},
{
"id": "6a7a0fd8-af33-40be-b0c0-7abc8421995d",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1680,
-240
],
"parameters": {
"color": "#975926",
"width": 224,
"height": 400,
"content": "## Step 7: Update row in sheet\n\n### What it does\nUpdates the original row in the **Google Sheet** with all the auto-generated data after a successful post, marking the workflow cycle as complete.\n\n"
},
"typeVersion": 1
},
{
"id": "8943dcb5-2e22-4d66-9d78-11bf6c600236",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1456,
-192
],
"parameters": {
"color": "#03722A",
"width": 208,
"height": 352,
"content": "## Step 6: Publish\n\n### What it does\nPosts the generated image to **Instagram** as a feed post with the AI-generated caption.\n\n"
},
"typeVersion": 1
}
],
"active": true,
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
},
"versionId": "c13fa399-e05c-448e-8dac-6228d4212594",
"connections": {
"Publish": {
"main": [
[
{
"node": "Update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Get-Ideas": {
"main": [
[
{
"node": "Generate-Prompt-and-Caption",
"type": "main",
"index": 0
}
]
]
},
"Upload a File": {
"main": [
[
{
"node": "Publish",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Get-Ideas",
"type": "main",
"index": 0
}
]
]
},
"Generate an image": {
"main": [
[
{
"node": "Upload a File",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Generate-Prompt-and-Caption",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Generate-Prompt-and-Caption": {
"main": [
[
{
"node": "Generate an image",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googlePalmApigoogleSheetsOAuth2ApiinstagramApiopenAiApiuploadToUrlApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
A fully automated n8n workflow that runs every day at 1:10 PM IST and publishes a fresh AI-generated image to Instagram — zero manual effort required after setup.
Source: https://n8n.io/workflows/15364/ — 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.
Most blogs publish words. This system publishes experiences.
This n8n workflow automatically converts new RSS feed articles into ready-to-publish social media posts for LinkedIn and Instagram.
Auto-post Google News to Instagram with OpenAI, PDF API Hub & Google Sheets
⚠️ DISCLAIMER: This workflow uses the AnySite LinkedIn community node, which is only available on self-hosted n8n instances. It will not work on n8n.cloud.
This workflow automates the creation, rendering, approval, and posting of TikTok-style POV (Point of View) videos to Instagram, with cross-posting to Facebook and YouTube. It eliminates manual video p