Automation library · Research and reporting

Analyze YouTube comments with OpenAI

Started by an incoming Telegram message, and works across Gmail, Google Drive and Telegram. It hands the judgement calls to OpenAI. 20 steps, 4 branches: a working afternoon to understand properly.

MediumCalls a model: OpenAI

20 stepsMedium: a working afternoon
4Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 1Model 2Logic 11Service 6

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

  1. 1Telegram Trigger1Telegram triggerStarts it
  2. 2OpenAILm Chat Open AiModel
  3. 3If (Check Admin)IfLogic
  4. 4YouTube Video Report AIAgentModel
  5. 5No Operation, do nothingNo OpLogic
  6. 6If (Check User Message)IfLogic
  7. 7Markdown to HTML FormatMarkdownLogic
  8. 8If (Check Perfect Message for 'SEO Analysis')IfLogic
  9. 9Send a alert message to AdminTelegramService
  10. 10Gmail ReportGmailService
  11. 11Save Report to Google DriveGoogle DriveService
  12. 12Send a text messageTelegramService
  13. 13RapiwaRapiwaService
  14. 14Code (Check Video ID & if exist then Separate it)CodeLogic
  15. 15IfIfLogic
  16. 16Edit Fields (Set API key)SetLogic
  17. 17Code (Make Video Comments Pagination)CodeLogic
  18. 18Split Out CommentsSplit OutLogic
  19. 19Combine CommentsSummarizeService
  20. 20Create One JSON ObjectAggregateLogic

How it's built

Starts on
An incoming Telegram message
Steps
20, with 4 branches
Size
Medium: a working afternoon
Connects to
Gmail, Google Drive, Telegram
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

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

How long does it take to set up?

Plan an afternoon. 20 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 20 steps before you point it at anything that matters.