N8N Tools - YouTube Enhanced icon

N8N Tools - YouTube Enhanced

Comprehensive YouTube Data API v3 and Analytics integration for N8N workflows

Actions83

Overview

The node "N8N Tools - YouTube Enhanced" provides a comprehensive integration with YouTube's Data API v3 and Analytics API. Specifically, the Analytics > Get Video Performance Data operation allows users to retrieve detailed performance metrics for videos on a specified YouTube channel over a defined date range. This is useful for content creators, marketers, and analysts who want to monitor video engagement, viewership trends, and revenue-related data.

Typical use cases include:

  • Tracking how well videos perform in terms of views, watch time, likes, comments, and shares.
  • Analyzing monetization metrics such as estimated revenue and ad revenue.
  • Generating reports for specific time periods to evaluate content strategy effectiveness.
  • Integrating YouTube analytics data into broader marketing or business intelligence workflows.

Example: A user can input their YouTube Channel ID, specify a start and end date, select metrics like "Views" and "Estimated Minutes Watched," and get back structured analytics data about their videos' performance during that period.

Properties

Name Meaning
Channel ID The unique identifier of the YouTube channel for which to retrieve video performance data.
Start Date The beginning date/time for the analytics data range.
End Date The ending date/time for the analytics data range.
Metrics The list of performance metrics to include in the report. Options include:
- Views, Estimated Minutes Watched, Average View Duration, Average View Percentage, Subscribers,
Subscribers Gained, Subscribers Lost, Likes, Dislikes, Comments, Shares, Estimated Revenue,
Ad Revenue, Gross Revenue, CPM, CPC, Impressions, Monetized Playbacks, Playback Based CPM,
Annotation Impressions, Annotation Clicks, Annotation Clickable Impressions, Annotation Closable Impressions,
Annotation Closes, Annotation Close Rate, Card Impressions, Card Clicks, Card Click Rate,
Card Teaser Impressions, Card Teaser Clicks, Card Teaser Click Rate, Audience Watch Ratio,
Relative Retention Performance.
Max Results Maximum number of results to return (default 100, min 1, max 1000).
Start Index Index of the first result to return (default 1).

Output

The output is an array of JSON objects, each representing a chunk of the requested video performance analytics data. The structure depends on the selected metrics but generally includes:

  • Time series or aggregated values for the chosen metrics (e.g., views count, watch time).
  • Data grouped by video or other dimensions if applicable.
  • Metadata related to the query such as pagination info if multiple pages of results exist.

No binary data output is produced by this operation.

Dependencies

  • Requires a valid subscription and API key credential for the external "N8N Tools API" service.
  • Requires OAuth2 credentials for YouTube API access.
  • The node internally uses helper classes to interact with YouTube Analytics endpoints.
  • Proper configuration of these credentials in n8n is necessary for successful execution.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential is correctly configured and active.
  • Permission errors from YouTube API: Ensure the OAuth2 credentials have sufficient scopes to access YouTube Analytics data.
  • Empty or incomplete data: Check that the Channel ID is correct and that the date range covers periods where data exists.
  • Rate limits: YouTube API enforces quotas; excessive requests may lead to quota exhaustion errors.
  • Incorrect parameter values: For example, specifying metrics not supported for the operation or invalid date formats can cause errors.

Links and References

Discussion