# Track positive Instagram comment sentiment with OpenAI: n8n workflow

> Started by a clock, and works across Gmail and Google Sheets. 19 steps, 2 branches, 2 loops or waits: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/track-positive-instagram-comment-sentiment-with-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Research and reporting](https://millionrounds.com/workflows?category=Research+and+reporting#library)

# Track positive Instagram comment sentiment with OpenAI

Started by a clock, and works across Gmail and Google Sheets. 19 steps, 2 branches, 2 loops or waits: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Ftrack-positive-instagram-comment-sentiment-with-openai)

**19 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**2** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Logic 10 Service 7

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

- 1 **1. Schedule - Daily 9 AM Comment Fetch** Schedule trigger *Starts it*
- 2 **16. Schedule - Daily 8 PM Digest Email** Schedule trigger *Starts it*
- 3 **2. Code - Set Config and Credentials** Code *Logic*
- 4 **17. Sheets - Read Today's Positive Comments** Google Sheets *Service*
- 5 **3. HTTP - Fetch Recent Instagram Posts** Http Request *Service*
- 6 **18. Code - Build Daily Digest Email** Code *Logic*
- 7 **4. Code - Extract Posts Array** Code *Logic*
- 8 **19. Gmail - Send Daily Digest to Team** Gmail *Service*
- 9 **5. Loop - Process Each Post** Split In Batches *Logic*
- 10 **6. HTTP - Fetch Comments for This Post** Http Request *Service*
- 11 **7. Code - Extract Comments Array** Code *Logic*
- 12 **8. Loop - Process Each Comment** Split In Batches *Logic*
- 13 **9. HTTP - AI Sentiment Analysis** Http Request *Service*
- 14 **10. Code - Parse Sentiment Label** Code *Logic*
- 15 **11. IF - Is Positive Sentiment?** If *Logic*
- 16 **12. Sheets - Check for Duplicate Comment ID** Google Sheets *Service*
- 17 **13. Code - Check Duplicate Result** Code *Logic*
- 18 **14. IF - Is New Comment?** If *Logic*
- 19 **15. Sheets - Save Positive Comment** Google Sheets *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 19, with 2 branches, 2 loops or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Gmail, Google Sheets
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

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

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 19 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 19 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%2Ftrack-positive-instagram-comment-sentiment-with-openai)
- **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 research and reporting, with the same services where possible, closest in size first.

- [**Customer financial report delivery system with Telegram** 19 steps · Google Sheets, Telegram](https://millionrounds.com/workflow/customer-financial-report-delivery-system-with-telegram)
- [**Generate Real Estate Research Reports with Exa AI and PandaDoc** 19 steps · Google Sheets, Slack](https://millionrounds.com/workflow/generate-real-estate-research-reports-with-exa-ai-and-pandad)
- [**AI-powered automatic analysis of YouTube product reviews** 19 steps · calls a model · Gmail](https://millionrounds.com/workflow/ai-powered-automatic-analysis-of-youtube-product-reviews)
- [**AI-powered technical analyst with Perplexity R1** 19 steps · calls a model · Gmail](https://millionrounds.com/workflow/ai-powered-technical-analyst-with-perplexity-r1)
- [**Automate actuarial premium adjustments and claims reporting** 19 steps · calls a model · Gmail, Slack](https://millionrounds.com/workflow/automate-actuarial-premium-adjustments-and-claims-reporting)
- [**Automate vendor analysis & contract management with OpenAI** 19 steps · calls a model · Airtable, Gmail](https://millionrounds.com/workflow/automate-vendor-analysis-and-contract-management-with-openai)
