C
Cody
Social & Content

Connecting OpenClaw with YouTube: A Practical Guide

·3 min read

YouTube is a major content channel for many brands and creators. Connecting OpenClaw to YouTube lets your content team query video performance, check subscriber growth, and pull engagement metrics from Slack without opening YouTube Studio.

How OpenClaw Integrations Work

OpenClaw is a self-hosted AI assistant that runs on your own server — typically an EC2 instance — and connects to Slack. It uses Claude under the hood to process requests. Out of the box, OpenClaw doesn't ship with pre-built connections to third-party tools. Instead, integrations are built using the skills system: markdown files in ~/.openclaw/skills/ that give Claude instructions for a particular domain, combined with HTTP tool calls to any API you expose to it.

In practice, adding a real integration means: getting API credentials from the third-party service, building or configuring a small proxy/endpoint that OpenClaw can call, and writing a skill file that tells Claude how to use it. For some tools this is an afternoon of work. For others — like YouTube — it's considerably more involved.

Connecting OpenClaw with YouTube: Step by Step

Step 1: Enable the YouTube Data API and Create Credentials

In Google Cloud Console, enable the YouTube Data API v3 for your project. Create OAuth 2.0 credentials or a Service Account. For your own channel data, OAuth with the channel owner's account is required — Service Accounts cannot access YouTube channel management data directly. Authenticate using the youtube.readonly scope for read-only access.

Step 2: Use the Channels and Videos Endpoints

Key YouTube Data API v3 endpoints: /channels?mine=true (your channel stats — subscribers, views), /videos?chart=mostPopular (trending videos), /videos?id={videoId}&part=statistics,snippet (specific video stats), /search?channelId={id}&order=date (recent videos from a channel). Note that analytics data (watch time, revenue) requires the separate YouTube Analytics API.

Step 3: Build the Proxy and Skill File

Build your proxy around channel stats and video performance endpoints. Write ~/.openclaw/skills/youtube.md with your channel ID, what metrics are available from the Data API vs the Analytics API, and what your team's most common queries are (e.g., "how did last week's video perform?", "what's our subscriber count?").

Challenges and Caveats

Data API vs Analytics API

YouTube has two separate APIs: the Data API (public stats — views, likes, comment count) and the Analytics API (private metrics — watch time, revenue, traffic sources). For full channel analytics, you need both. They have different authentication requirements and quotas.

Quota Is Tight

The YouTube Data API default quota is 10,000 units per day. Different endpoints cost different amounts — a search query costs 100 units, while reading video statistics costs 1 unit. If your team queries YouTube frequently, design your proxy to cache results to avoid exhausting the daily quota.


Skip All of This — Use Cody Instead

Cody has YouTube integration built in. Query video performance and channel growth from Slack without API setup or quota management.

Get started with Cody →


Related Guides


Need the model-flexible version? See: How to Connect YouTube to OpenClaw: Setup, Models, and Workflow Guide.