Post daily AI-generated Instagram images from Google Sheets with GPT-4.1 Nano and Google Gemini
Go to WorkflowDescription
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
Triggers daily at 1:10 PM IST via Schedule Trigger
Fetches a pending idea from a Google Sheet where Status = "Ready"
Generates an image prompt + caption using GPT-4.1 Nano — tailored to the
niche's aesthetic (luxury, minimalist, vibrant, etc.)
Creates the image using Google Gemini 2.5 Flash Image model
Uploads the image to a public CDN via UploadToURL (https://uploadtourl.com)
Posts to Instagram as a feed post with the AI-generated caption
Updates the Google Sheet row with the prompt, caption, image URL, and
status "Posted"
🛠 Tools & Services Used
| Tool | Purpose |
|---|---|
| n8n Schedule Trigger | Fires the workflow daily at 13:10 |
| Google Sheets | Stores content ideas and tracks post status |
| OpenAI GPT-4.1 Nano | Generates image prompts and Instagram captions |
| Google Gemini 2.5 Flash Image | Generates the AI image from the prompt |
| UploadToURL | Hosts the image on a public CDN |
| Instagram Graph API | Publishes the image as a feed post |
📋 Google Sheet Structure
Your sheet (Instagram Posting) needs these columns:
| Column | Description |
|---|---|
| Idea/Niche | The content topic (e.g. Minimalist Home, Luxury Cars) |
| Status | Set to Ready to queue a post; auto-updated to Posted |
| Prompt | Auto-filled with the AI-generated image prompt |
| Caption | Auto-filled with the AI-generated Instagram caption |
| Image_URL | Auto-filled with the CDN-hosted image link |
⚙️ Setup Requirements
Google Sheets OAuth2** credentials connected to your spreadsheet
OpenAI API** key (GPT-4.1 Nano)
Google Gemini (PaLM) API** key
UploadToURL** account and API credentials
Instagram Graph API** credentials (connected Business/Creator account)
💡 How to Use
Add your content ideas to the Google Sheet with Status = "Ready"
Import this workflow into your n8n instance
Connect all credentials
Activate the workflow — it will auto-post daily at 1:10 PM IST