Analyze YouTube comments with OpenAI, Google Sheets, and Gmail
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs on Google Sheets events. Along the way it connects Google Sheets, OpenAI Chat Model and Gmail. It also calls googleapis.com over HTTP.
How it runs
Trigger: On Google Sheets events.
- Configuration (Edit Fields (Set)): sets 10 fields: video_id, video_status, row_number…
- Keep only pending videos (Filter): keeps only the items that match a condition
- Get video details (HTTP Request): calls googleapis.com
- Fetch top comments (HTTP Request): calls googleapis.com
- Prepare comments for AI (Code): runs custom JavaScript code
- Has comments? (If): checks a condition and branches into true / false
- Analyze comments with AI (AI Agent): runs an AI agent, with model: OpenAI analysis model; output parser: Structured analysis parser
- Mark row as no comments (Google Sheets): update
- Build email report (Code): runs custom JavaScript code
- Email the report (Gmail): uses Gmail
…plus 1 more step. See the full node list below.
Services it uses
HTTP calls to: googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Google Sheets Trigger
n8n-nodes-base.googleSheetsTrigger - Edit Fields (Set)
n8n-nodes-base.set - Filter
n8n-nodes-base.filter - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Gmail
n8n-nodes-base.gmail - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow monitors a Google Sheets list of YouTube video IDs, fetches video details and top comments from the YouTube Data API, analyzes the comments with OpenAI into structured sentiment and themes, emails an HTML report via Gmail, and…