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 Analytics data specifically related to annotation performance for a given YouTube channel. It retrieves metrics such as annotation impressions, clicks, close rates, and other engagement statistics over a specified date range. This is useful for content creators or marketers who want to analyze how viewers interact with annotations on their videos, helping optimize annotation usage to increase viewer engagement.

Practical examples include:

  • Measuring how many times annotations were clicked or closed within a time period.
  • Understanding the effectiveness of clickable annotations in driving viewer actions.
  • Comparing annotation engagement across different date ranges to assess changes after updates.

Properties

Name Meaning
Channel ID The unique identifier of the YouTube channel for which annotation performance data is requested.
Start Date The start date (inclusive) for the analytics data retrieval period.
End Date The end date (inclusive) for the analytics data retrieval period.
Metrics The specific annotation-related metrics to include in the report. Options include:
- views, estimatedMinutesWatched, averageViewDuration, averageViewPercentage, subscribers, subscribersGained, subscribersLost, likes, dislikes, comments, shares, estimatedRevenue, adRevenue, grossRevenue, cpm, cpc, impressions, monetizedPlaybacks, playbackBasedCpm, annotationImpressions, annotationClicks, annotationClickableImpressions, annotationClosableImpressions, annotationCloses, annotationCloseRate, cardImpressions, cardClicks, cardClickRate, cardTeaserImpressions, cardTeaserClicks, cardTeaserClickRate, audienceWatchRatio, relativeRetentionPerformance
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, minimum 1).

Output

The output JSON contains the analytics data retrieved from the YouTube Analytics API for annotation performance. This includes the requested metrics aggregated over the specified date range for the given channel. The structure typically includes rows of data with metric values and possibly dimension values if dimensions are used (though not required here).

No binary data output is involved in this operation.

Example output snippet (conceptual):

{
  "kind": "youtubeAnalytics#resultTable",
  "columnHeaders": [
    {"name": "day", "type": "STRING"},
    {"name": "annotationImpressions", "type": "INTEGER"},
    {"name": "annotationClicks", "type": "INTEGER"},
    ...
  ],
  "rows": [
    ["2024-01-01", 1500, 300],
    ["2024-01-02", 1700, 350]
  ]
}

Dependencies

  • Requires an active subscription and valid API key credential for the external N8N Tools API service.
  • Requires OAuth2 credentials for YouTube API access.
  • The node internally uses the YouTube Analytics API v3 via the N8N Tools API proxy.
  • No additional environment variables beyond standard n8n credential setup are needed.

Troubleshooting

  • Invalid subscription or API key error: If you receive errors about invalid subscription or API key, verify that your API key credential is correct and has the necessary permissions.
  • Permission errors from YouTube API: Ensure the OAuth2 credentials have sufficient scopes to access YouTube Analytics data.
  • Empty or incomplete data: Check that the date range is valid and that the channel ID corresponds to a channel with available analytics data.
  • Max Results limits: If requesting too many results, reduce the Max Results parameter to stay within allowed limits.
  • Network or timeout issues: Verify network connectivity and retry if transient errors occur.

Links and References

Discussion