👉 n8n No Limits Access :

https://www.hostg.xyz/SHHAd

Hébergement VPS n8n | Automatisation sécurisée et évolutive

coupon -15% : DRFIRAS15

👉 Formation n8n en Français

Formation n8n en Français : Automatisation & Agents IA

coupon -20% : LANCEMENT : HERE


What you will build

This workflow watches a Google Sheet of YouTube video IDs. Whenever you mark a row as Pending, it fetches the video's top comments through the YouTube Data API, runs a structured AI analysis (sentiment score, positive/negative/neutral split, themes, questions, feedback, insights), emails you an HTML report through Gmail, and writes the results back into the same sheet so it becomes a live dashboard.

<aside> 🎯

Goal of this document: let you rebuild the workflow manually, node by node, live on camera. Every prompt, expression, JSON body and script below is copy‑paste ready.

</aside>

Flow overview

Watch spreadsheet for videos (Sheets Trigger)
   → Configuration (Set)
   → Keep only pending videos (Filter)
   → Get video details (HTTP · YouTube API)
   → Fetch top comments (HTTP · YouTube API)
   → Prepare comments for AI (Code)
   → Has comments? (IF)
        ├─ TRUE  → Analyze comments with AI (AI Agent)
        │            → Build email report (Code)
        │            → Email the report (Gmail)
        │            → Log analysis to sheet (Google Sheets)
        └─ FALSE → Mark row as no comments (Google Sheets)

AI sub-nodes:
  OpenAI analysis model      → model of "Analyze comments with AI"
  Structured analysis parser → output parser of "Analyze comments with AI"
  Output fixer model         → model of "Structured analysis parser"

Prerequisites & credentials

<aside> 🔑

Create these three credentials in n8n before building. Names in bold are the exact credential names used in the workflow.

</aside>

1. YouTube Data API Key (type: Header/Query AuthhttpQueryAuth)