Publishing to YouTube
This tutorial covers connecting a YouTube channel to PowerMarketing and publishing videos to it — Google Cloud setup, OAuth, the publish flow, quotas, and what to do when it fails.
Human action AI Agent Approval gate Live on channel
What you can publish — and what you cannot
YouTube publishing in PowerMarketing means uploading a video. The post's text becomes the video's title and description.
| Content | Supported | Notes |
|---|---|---|
| Video upload | ✅ Yes | Via the resumable upload protocol. Title from the post title, description from the post body. |
| Shorts | ✅ Yes | A normal upload — YouTube classifies it as a Short based on aspect ratio and duration. |
| Community posts (text) | ❌ No | Not a PowerMarketing limitation. Google has never published a write API for Community posts, so no tool can automate them. |
| Comments / replies | ❌ No | Not implemented. |
One-Time Setup
Unlike LinkedIn, YouTube access goes through a Google Cloud project. Budget about 15 minutes the first time.
Step 1 — Create a Google Cloud project and enable the API
Create the project
Go to console.cloud.google.com and create a new project (or pick an existing one). The name is internal only — your viewers never see it.
Enable the YouTube Data API v3
APIs & Services → Library, search for YouTube Data API v3, and click Enable. Nothing works until this is done — calls fail with accessNotConfigured.
Step 2 — Configure the OAuth consent screen
Choose the user type
APIs & Services → OAuth consent screen. Choose External unless every channel you will ever connect belongs to your Google Workspace organisation.
Add the scopes
Add exactly these two:
https://www.googleapis.com/auth/youtube.upload— upload videos to the channel.https://www.googleapis.com/auth/youtube.readonly— read back view/like/comment counts for the learn-loop.
Both are sensitive scopes. Google requires verification before an app in Production can be used by accounts outside your test-user list.
Add yourself as a test user
While the app is in Testing, add the Google account that owns your channel under Test users. This lets you use it immediately without waiting for verification.
Testing-mode refresh tokens expire after 7 days. If YouTube publishing stops working about a week after you connect, this is why — either submit the app for verification, or reconnect the channel.
Step 3 — Create the OAuth client
Create the credentials
APIs & Services → Credentials → Create credentials → OAuth client ID. Application type: Web application.
Add the redirect URI
Under Authorized redirect URIs, paste the exact URL PowerMarketing shows you in Step 4:
https://marketing-api.planningpowertools.com/api/oauth/google/callback
It must match character for character — a trailing slash is enough to break it. Mismatches produce redirect_uri_mismatch, the most common setup failure.
Copy the Client ID and Secret
Google shows both once. The ID ends in .apps.googleusercontent.com.
Step 4 — Save them in PowerMarketing
Settings → Credentials → YouTube Channel Configuration
Paste the Client ID and Client Secret, confirm the Redirect URI (use Copy to take the exact value into Google Cloud), and click Save App Config. The badge turns to Configured and the Connect button becomes available.
Step 5 — Connect the channel
Click Connect YouTube Channel
You are sent to Google's consent screen. Sign in with the account that owns the channel and grant both scopes. PowerMarketing requests offline access, so Google issues a refresh token and the connection survives beyond the first hour.
Confirm the channel appears
You are returned to Settings and the channel is listed under Social Credentials with its real name, resolved from the API. If it says no YouTube channel was found, the Google account you authorised does not own a channel — switch accounts and reconnect.
Publishing a video
video and reel are in ALWAYS_REQUIRE_APPROVAL, so they can never auto-publish regardless of your autopilot level or Publication Rules. Uploading to a public channel is irreversible in practice, so a human always confirms.
The upload runs as a two-step resumable session, which is what YouTube requires for media:
- PowerMarketing downloads the rendered video from your provider.
POST /upload/youtube/v3/videos?uploadType=resumableopens a session with the title, description, tags and privacy status.- The bytes are streamed to the session URI Google returns.
- The resulting video ID is stored, and the post links to
https://www.youtube.com/watch?v=<id>.
Where the fields come from
| YouTube field | Source | Limit |
|---|---|---|
| Title | Post title, or the first line of the content | 100 chars — truncated automatically |
| Description | Post content | 5,000 chars — truncated automatically |
| Privacy | public by default | Override with privacy_status (private, unlisted) |
| Category | 22 (People & Blogs) | Override with category_id |
| Video file | The post's linked video (source_video_id) | Required |
Quotas & limits
The YouTube Data API uses a quota-unit budget, not a request count. A new project gets 10,000 units per day.
| Operation | Cost | Per day at default quota |
|---|---|---|
videos.insert (upload) | 1,600 units | ~6 uploads |
videos.list (metrics) | 1 unit | Effectively unlimited |
channels.list (connect) | 1 unit | Effectively unlimited |
Newly created projects are also subject to YouTube's unverified-app upload limit: videos upload as private and cannot be made public until the project passes API compliance review. If your uploads land but stay private, this is why.
Metrics
The daily metrics job (04:00 UTC) reads back statistics with videos.list?part=statistics and maps them onto PowerMarketing's common shape:
| PowerMarketing | YouTube field |
|---|---|
impressions | viewCount |
likes | likeCount |
comments | commentCount |
shares | Always 0 — YouTube's API does not expose a share count |
These feed the same learn-loop as LinkedIn, so YouTube performance influences future planning.
Reference tables
| Item | Value |
|---|---|
| Required scopes | youtube.upload, youtube.readonly |
| Redirect URI | {API_BASE}/api/oauth/google/callback |
| Upload endpoint | POST https://www.googleapis.com/upload/youtube/v3/videos |
| Metrics endpoint | GET https://www.googleapis.com/youtube/v3/videos |
| Token refresh | POST https://oauth2.googleapis.com/token — automatic, 2 min before expiry |
| Description limit | 5,000 characters |
| Title limit | 100 characters |
| Auto-publish | Never — video always requires approval |
Troubleshooting
| Symptom | Cause & fix |
|---|---|
redirect_uri_mismatch | The URI in Google Cloud differs from the one PowerMarketing sends. Use the Copy button and paste it verbatim — no trailing slash. |
accessNotConfigured | YouTube Data API v3 is not enabled on the project. Enable it and retry. |
| "Google did not return a refresh token" | Google only issues one on first consent. Remove PowerMarketing at myaccount.google.com/permissions, then reconnect. |
| "no YouTube channel was found" | The authorised Google account does not own a channel. Create one, or authorise the account that does. |
| Publishing stops after ~1 hour | Token refresh could not run — usually the Client Secret changed. Re-save the app config, then reconnect. |
| Publishing stops after ~7 days | The consent screen is still in Testing; Google expires those refresh tokens weekly. Move to Production (requires verification) or reconnect. |
quotaExceeded | You hit 10,000 units — roughly 6 uploads. Wait for the daily reset or request more quota in Google Cloud. |
| "YouTube requires 'video_url'" | The post has no video attached. Generate one on the Videos page, or link an existing one, before publishing. |
| Upload succeeds but the video stays private | Unverified-project restriction. Complete Google's API compliance review to publish publicly. |