Automation library · Scheduling

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.

MediumCalls a model: Gemini

18 stepsMedium: a working afternoon
0Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 7Logic 6Service 4

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

  1. 1When clicking ‘Test workflow’Manual triggerStarts it
  2. 2Extract Instagram Media ListHttp RequestService
  3. 3Split Media ItemsSplit OutLogic
  4. 4Fetch Metrics per PostHttp RequestService
  5. 5Send Email ReportGmailService
  6. 6Set Environment VariablesSetLogic
  7. 7Merge Posts and MetricsMergeLogic
  8. 8Flatten Merged PostsCodeLogic
  9. 9Convert to Text for AICodeLogic
  10. 10Gemini Model - Post AnalyzerLm Chat Google GeminiModel
  11. 11Gemini Model - MetricsLm Chat Google GeminiModel
  12. 12Instagram Post Performance Analyzer (AI)Chain LlmModel
  13. 13AI Content Calendar GeneratorChain LlmModel
  14. 14Structured JSON ExtractorChain LlmModel
  15. 15Gemini Model - ParserLm Chat Google GeminiModel
  16. 16Parse Structured JSON OutputOutput Parser StructuredModel
  17. 17Save Content Plan to Google SheetsGoogle SheetsService
  18. 18Split Content ItemsCodeLogic

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.