Analyze YouTube niche trends with Apify and OpenAI
Ready for 3.0What this workflow does
This AI workflow has 8 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenAI. It also calls api.apify.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Settings (Edit Fields (Set)): sets 4 fields: niche, topVideos, maxComments…
- Search YouTube (HTTP Request): calls api.apify.com (POST)
- Pick top videos (Code): runs custom JavaScript code
- Get comments (HTTP Request): calls api.apify.com (POST)
- Build prompt (Code): runs custom JavaScript code
- Summarise with OpenAI (OpenAI): message (text)
- Report (Code): runs custom JavaScript code
Services it uses
Other Apify + OpenAI templates (230)
HTTP calls to: api.apify.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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (5)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
Quick overview This workflow runs manually to find this week’s most popular YouTube videos for a niche using Apify, collects top comments from the highest-viewed videos, and uses OpenAI to produce a concise audience insight report with themes, questions,…