What This Workflow Does
This n8n workflow automates the analysis of YouTube videos to identify viral content potential and engagement metrics. It searches YouTube for videos based on your search terms, retrieves detailed video data including engagement statistics, and calculates a viral scoring system. The results are automatically organized and stored in Google Sheets for easy tracking and analysis.
How It Works
The workflow begins with a form trigger that accepts your search query and desired content format (short, medium, or long videos). Here’s the step-by-step process:
- Submit a search term through the form interface
- Select your preferred video format: short, medium, or long
- The httpRequest node queries the YouTube API to retrieve video IDs matching your search criteria
- A code node extracts and processes the video IDs into a usable format
- The splitInBatches node divides the video IDs into manageable groups to avoid API rate limits
- Another httpRequest node fetches comprehensive video data for each ID, including view counts, likes, comments, and publication dates
- The code node calculates engagement scoring based on the retrieved metrics
- Results are merged and formatted, then automatically pushed to your Google Sheets document
Use Cases
- Content creators can identify trending topics and viral patterns in their niche to inform future video production strategies
- Digital marketers can monitor competitor video performance and engagement rates to benchmark their own content
- YouTube channel managers can track which video types and formats generate the highest engagement scores for their audience
- Social media analysts can create automated reports of top-performing videos across specific topics or keywords
- Researchers can collect and analyze large datasets of video engagement metrics for academic or market research purposes
Nodes Used
- formTrigger: Initiates the workflow when users submit search terms and format preferences
- httpRequest: Communicates with YouTube API endpoints to retrieve video IDs and detailed video data
- code: Processes raw API responses, extracts video IDs, and calculates engagement scoring algorithms
- splitInBatches: Divides large video datasets into smaller batches to manage API rate limits and system performance
- wait: Introduces delays between API requests to prevent rate limiting and ensure stable data retrieval
- merge: Combines data from multiple sources before sending to Google Sheets
- googleSheets: Stores and organizes the final results in a spreadsheet for tracking and analysis
- set: Defines and configures variable values throughout the workflow execution
- stickyNote: Provides documentation and instructions within the workflow interface
Prerequisites
- A Google Cloud account with YouTube Data API enabled and an API key generated
- A Google Sheets account with a blank spreadsheet created for storing workflow results
- An n8n account with sufficient workflow execution credits for regular use
- Basic understanding of API keys and how to configure authentication in n8n
- Google Sheets API credentials configured in your n8n instance
Difficulty Level
Intermediate. This workflow requires knowledge of API integration, basic code execution for scoring algorithms, and Google Sheets setup. Users should be familiar with n8n’s node configuration and have their API credentials ready before starting. No advanced programming skills are required, as the template provides pre-built code logic that can be customized for specific engagement metrics.
This workflow template is shared under the n8n fair-code license. Free to use and modify.
Leave a Reply