N8N Tools - YouTube Enhanced icon

N8N Tools - YouTube Enhanced

Comprehensive YouTube Data API v3 and Analytics integration for N8N workflows

Actions83

Overview

This node operation fetches YouTube revenue analytics data for a specified channel over a defined date range. It allows users to retrieve detailed revenue-related metrics such as estimated revenue, ad revenue, gross revenue, CPM, CPC, and monetized playbacks. This is particularly useful for content creators, marketers, or analysts who want to monitor and analyze the financial performance of their YouTube channels.

Practical examples include:

  • Tracking monthly revenue trends for a YouTube channel.
  • Comparing ad revenue versus estimated revenue over time.
  • Analyzing CPM and CPC metrics to optimize monetization strategies.

Properties

Name Meaning
Channel ID The unique identifier of the YouTube channel for which to retrieve revenue data.
Start Date The start date for the analytics data period (inclusive).
End Date The end date for the analytics data period (inclusive).
Metrics The specific revenue-related 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 (between 1 and 1000).
Start Index Index of the first result to return (minimum 1).

Output

The output is a JSON array where each item contains the requested revenue analytics data structured according to the selected metrics and parameters. Each JSON object corresponds to a set of analytics data points for the specified channel and date range.

The exact structure depends on the YouTube Analytics API response but typically includes fields such as metric values, dates, and possibly dimension groupings if specified.

No binary data is output by this operation.

Dependencies

  • Requires an active subscription and valid API key for the external "N8N Tools" API service that acts as a proxy or enhancer for YouTube API calls.
  • Requires OAuth2 credentials for YouTube API access configured in n8n.
  • The node internally uses helper classes to interact with YouTube Analytics endpoints.

Troubleshooting

  • Invalid subscription or API key error: If you receive an error about invalid subscription or API key, verify that your API key credential is correct and has the necessary permissions.
  • Date range errors: Ensure that the start date is before or equal to the end date; otherwise, the API may reject the request.
  • Quota limits: YouTube Analytics API enforces quota limits; excessive requests may lead to quota exhaustion errors.
  • Missing required parameters: Make sure all required properties like Channel ID, Start Date, End Date, and Metrics are provided.
  • Empty or unexpected results: Check that the channel has revenue data for the specified period and metrics.

Links and References

Discussion