πŸ“± Post daily AI-generated Instagram images from Google Sheets with GPT-4.1 Nano and Google Gemini

⚑ 361 views Β· πŸ“± Social Media & Email Marketing

πŸ’‘ Pro Tip β€” Heads up β€” if this workflow’s Instagram scraping breaks (it happens whenever Meta updates their frontend), ScraperNode is a community node that handles profiles, posts, reels, and comments without any HTML parsing.

View All Scrapers

Description

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.

It reads content ideas from a Google Sheet, uses GPT-4.1 Nano to craft a cinematic image prompt and a niche-matched caption, generates the image with Google Gemini 2.5 Flash, uploads it to a public CDN called Upload to Url (https://uploadtourl.com) , posts it to Instagram, and logs everything back to the sheet.


✨ What This Workflow Does

  1. Triggers daily at 1:10 PM IST via Schedule Trigger
  2. Fetches a pending idea from a Google Sheet where Status = "Ready"
  3. Generates an image prompt + caption using GPT-4.1 Nano β€” tailored to the niche’s aesthetic (luxury, minimalist, vibrant, etc.)
  4. Creates the image using Google Gemini 2.5 Flash Image model
  5. Uploads the image to a public CDN via UploadToURL (https://uploadtourl.com)
  6. Posts to Instagram as a feed post with the AI-generated caption
  7. Updates the Google Sheet row with the prompt, caption, image URL, and status "Posted"

πŸ›  Tools & Services Used

ToolPurpose
n8n Schedule TriggerFires the workflow daily at 13:10
Google SheetsStores content ideas and tracks post status
OpenAI GPT-4.1 NanoGenerates image prompts and Instagram captions
Google Gemini 2.5 Flash ImageGenerates the AI image from the prompt
UploadToURLHosts the image on a public CDN
Instagram Graph APIPublishes the image as a feed post

πŸ“‹ Google Sheet Structure

Your sheet (Instagram Posting) needs these columns:

ColumnDescription
Idea/NicheThe content topic (e.g. Minimalist Home, Luxury Cars)
StatusSet to Ready to queue a post; auto-updated to Posted
PromptAuto-filled with the AI-generated image prompt
CaptionAuto-filled with the AI-generated Instagram caption
Image_URLAuto-filled with the CDN-hosted image link

βš™οΈ Setup Requirements


πŸ’‘ How to Use

  1. Add your content ideas to the Google Sheet with Status = "Ready"
  2. Import this workflow into your n8n instance
  3. Connect all credentials
  4. Activate the workflow β€” it will auto-post daily at 1:10 PM IST

πŸ”— Nodes Used

Google Sheets, Schedule Trigger, Basic LLM Chain, OpenAI Chat Model, Google Gemini

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup