# Instagram insights & AI content calendar generator with Gemini: n8n workflow

> Started by an event in a connected app, and works across Gmail and Google Sheets. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/instagram-insights-and-ai-content-calendar-generator-with-ge (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Scheduling](https://millionrounds.com/workflows?category=Scheduling#library)

# Instagram insights & AI content calendar generator with Gemini

Started by an event in a connected app, and works across Gmail and Google Sheets. It hands the judgement calls to Gemini. 18 steps: a working afternoon to understand properly.

Medium Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Finstagram-insights-and-ai-content-calendar-generator-with-ge)

**18 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 7 Logic 6 Service 4

The steps in the order they run, from what starts it.

- 1 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 2 **Extract Instagram Media List** Http Request *Service*
- 3 **Split Media Items** Split Out *Logic*
- 4 **Fetch Metrics per Post** Http Request *Service*
- 5 **Send Email Report** Gmail *Service*
- 6 **Set Environment Variables** Set *Logic*
- 7 **Merge Posts and Metrics** Merge *Logic*
- 8 **Flatten Merged Posts** Code *Logic*
- 9 **Convert to Text for AI** Code *Logic*
- 10 **Gemini Model - Post Analyzer** Lm Chat Google Gemini *Model*
- 11 **Gemini Model - Metrics** Lm Chat Google Gemini *Model*
- 12 **Instagram Post Performance Analyzer (AI)** Chain Llm *Model*
- 13 **AI Content Calendar Generator** Chain Llm *Model*
- 14 **Structured JSON Extractor** Chain Llm *Model*
- 15 **Gemini Model - Parser** Lm Chat Google Gemini *Model*
- 16 **Parse Structured JSON Output** Output Parser Structured *Model*
- 17 **Save Content Plan to Google Sheets** Google Sheets *Service*
- 18 **Split Content Items** Code *Logic*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 18
- **Size:** Medium: a working afternoon
- **Connects to:** Gmail, Google Sheets
- **Model:** Gemini

## Questions

What does it need to run?

An n8n account, plus your own Gmail and Google Sheets accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls Gemini. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 18 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Finstagram-insights-and-ai-content-calendar-generator-with-ge)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also scheduling, with the same services where possible, closest in size first.

- [**Auto-generate sales meeting briefs with OpenAI and LinkedIn** 18 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/auto-generate-sales-meeting-briefs-with-openai-and-linkedin)
- [**Automate post-meeting tasks with Fireflies and OpenAI** 18 steps · calls a model · Gmail, Telegram](https://millionrounds.com/workflow/automate-post-meeting-tasks-with-fireflies-and-openai)
- [**Automated Pre-Meeting Briefs & Reminders with Gemini and Gmail** 18 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automated-pre-meeting-briefs-and-reminders-with-gemini-and-g)
- [**Create and schedule LinkedIn posts from Google Sheets** 18 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/create-and-schedule-linkedin-posts-from-google-sheets)
- [**Handle real estate SMS inquiries with Twilio and Google Sheets** 18 steps · calls a model · Google Calendar, Google Sheets](https://millionrounds.com/workflow/handle-real-estate-sms-inquiries-with-twilio-and-google-shee)
- [**Manage tasks & send scheduled reminders with Telegram Bot** 18 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/manage-tasks-and-send-scheduled-reminders-with-telegram-bot)
