# Auto-reply to Instagram comments with Gemini and Google Sheets: n8n workflow

> Started by a clock, and works across Google Sheets. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/auto-reply-to-instagram-comments-with-gemini-and-google-shee (Millionrounds; every figure on the page links to its filing or article)

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

# Auto-reply to Instagram comments with Gemini and Google Sheets

Started by a clock, and works across Google Sheets. It hands the judgement calls to Gemini. 18 steps, 1 branch, 2 loops or waits: a working afternoon to understand properly.

Medium Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fauto-reply-to-instagram-comments-with-gemini-and-google-shee)

**18 steps** Medium: a working afternoon

**1** Branch: places the flow splits

**2** Loops or waits

**1** Service it connects to

## The flow

Starts it 2 Model 1 Logic 10 Service 5

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

- 1 **Manual Trigger** Manual trigger *Starts it*
- 2 **Schedule Trigger (Every 15 min)** Schedule trigger *Starts it*
- 3 **Configure Post & Message** Set *Logic*
- 4 **Get Instagram Posts** Facebook Graph Api *Service*
- 5 **Filter and Get Post ID** Code *Logic*
- 6 **Get All Comments** Facebook Graph Api *Service*
- 7 **Read Contacted Users** Google Sheets *Service*
- 8 **Filter New Comments** Code *Logic*
- 9 **Check If Has New Comments** If *Logic*
- 10 **Loop Over Items** Split In Batches *Logic*
- 11 **Skip (No New Comments)** No Op *Logic*
- 12 **Generate Summary** Code *Logic*
- 13 **Generate Reply with AI** Google Gemini *Model*
- 14 **Parse AI Reply** Code *Logic*
- 15 **Reply on Comments** Facebook Graph Api *Service*
- 16 **Wait** Wait *Logic*
- 17 **API Error Fallback** No Op *Logic*
- 18 **Record Contacted User** Google Sheets *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 18, with 1 branch, 2 loops or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Google Sheets
- **Model:** Gemini

## Questions

What does it need to run?

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

What starts it?

It starts on a clock.

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%2Fauto-reply-to-instagram-comments-with-gemini-and-google-shee)
- **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.

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

## Workflows like it

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

- [**AI calling agent with OpenAI** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/ai-calling-agent-with-openai)
- [**AI-Powered Paperclip Task Assigner & Completion Tracker** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/ai-powered-paperclip-task-assigner-and-completion-tracker)
- [**Analyze Meta ads daily with Gemini and Google Sheets** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-meta-ads-daily-with-gemini-and-google-sheets)
- [**Automated job listing aggregator & AI cover letter generator** 18 steps · calls a model · Google Docs, Google Sheets](https://millionrounds.com/workflow/automated-job-listing-aggregator-and-ai-cover-letter-generat)
- [**Cross-check news claims by chat with Webz.io and OpenAI** 18 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/cross-check-news-claims-by-chat-with-webz-io-and-openai)
- [**Draft and approve Gmail replies with OpenAI and CustomJS** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/draft-and-approve-gmail-replies-with-openai-and-customjs-3)
