Automation library · Research and reporting

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

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

The flow

Starts it 2Logic 10Service 7

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

  1. 11. Schedule - Daily 9 AM Comment FetchSchedule triggerStarts it
  2. 216. Schedule - Daily 8 PM Digest EmailSchedule triggerStarts it
  3. 32. Code - Set Config and CredentialsCodeLogic
  4. 417. Sheets - Read Today's Positive CommentsGoogle SheetsService
  5. 53. HTTP - Fetch Recent Instagram PostsHttp RequestService
  6. 618. Code - Build Daily Digest EmailCodeLogic
  7. 74. Code - Extract Posts ArrayCodeLogic
  8. 819. Gmail - Send Daily Digest to TeamGmailService
  9. 95. Loop - Process Each PostSplit In BatchesLogic
  10. 106. HTTP - Fetch Comments for This PostHttp RequestService
  11. 117. Code - Extract Comments ArrayCodeLogic
  12. 128. Loop - Process Each CommentSplit In BatchesLogic
  13. 139. HTTP - AI Sentiment AnalysisHttp RequestService
  14. 1410. Code - Parse Sentiment LabelCodeLogic
  15. 1511. IF - Is Positive Sentiment?IfLogic
  16. 1612. Sheets - Check for Duplicate Comment IDGoogle SheetsService
  17. 1713. Code - Check Duplicate ResultCodeLogic
  18. 1814. IF - Is New Comment?IfLogic
  19. 1915. Sheets - Save Positive CommentGoogle SheetsService

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.