PowerMarketing Docs
Back to App

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

Prerequisites. (1) An active brand in PowerMarketing. (2) A working LLM key for that brand, or the shared allowance. (3) A Google account that owns a YouTube channel. (4) A video provider configured (Settings → Video Providers) if you want PowerMarketing to render the video for you.

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.

ContentSupportedNotes
Video upload✅ YesVia the resumable upload protocol. Title from the post title, description from the post body.
Shorts✅ YesA normal upload — YouTube classifies it as a Short based on aspect ratio and duration.
Community posts (text)❌ NoNot a PowerMarketing limitation. Google has never published a write API for Community posts, so no tool can automate them.
Comments / replies❌ NoNot implemented.
A text-only post to YouTube will fail by design. The adapter raises "YouTube requires 'video_url' in options" rather than silently publishing nothing. Attach or generate a video first.

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

1

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.

2

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.

1

Choose the user type

APIs & Services → OAuth consent screen. Choose External unless every channel you will ever connect belongs to your Google Workspace organisation.

2

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.

3

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

1

Create the credentials

APIs & Services → Credentials → Create credentials → OAuth client ID. Application type: Web application.

2

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.

3

Copy the Client ID and Secret

Google shows both once. The ID ends in .apps.googleusercontent.com.

Step 4 — Save them in PowerMarketing

1

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

1

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.

2

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

✍️
You
Topic + content type Video
🤖
Agent
Script + description
🎬
Provider
Render video
🛡️
Always
Human approval
▶️
Live
On your channel
Video always requires approval. 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:

  1. PowerMarketing downloads the rendered video from your provider.
  2. POST /upload/youtube/v3/videos?uploadType=resumable opens a session with the title, description, tags and privacy status.
  3. The bytes are streamed to the session URI Google returns.
  4. The resulting video ID is stored, and the post links to https://www.youtube.com/watch?v=<id>.

Where the fields come from

YouTube fieldSourceLimit
TitlePost title, or the first line of the content100 chars — truncated automatically
DescriptionPost content5,000 chars — truncated automatically
Privacypublic by defaultOverride with privacy_status (private, unlisted)
Category22 (People & Blogs)Override with category_id
Video fileThe 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.

OperationCostPer day at default quota
videos.insert (upload)1,600 units~6 uploads
videos.list (metrics)1 unitEffectively unlimited
channels.list (connect)1 unitEffectively unlimited
Six uploads a day is the real ceiling until you request a quota increase from Google. Metrics polling is essentially free, so the daily refresh will not eat into your upload budget.

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:

PowerMarketingYouTube field
impressionsviewCount
likeslikeCount
commentscommentCount
sharesAlways 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

ItemValue
Required scopesyoutube.upload, youtube.readonly
Redirect URI{API_BASE}/api/oauth/google/callback
Upload endpointPOST https://www.googleapis.com/upload/youtube/v3/videos
Metrics endpointGET https://www.googleapis.com/youtube/v3/videos
Token refreshPOST https://oauth2.googleapis.com/token — automatic, 2 min before expiry
Description limit5,000 characters
Title limit100 characters
Auto-publishNever — video always requires approval

Troubleshooting

SymptomCause & fix
redirect_uri_mismatchThe URI in Google Cloud differs from the one PowerMarketing sends. Use the Copy button and paste it verbatim — no trailing slash.
accessNotConfiguredYouTube 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 hourToken refresh could not run — usually the Client Secret changed. Re-save the app config, then reconnect.
Publishing stops after ~7 daysThe consent screen is still in Testing; Google expires those refresh tokens weekly. Move to Production (requires verification) or reconnect.
quotaExceededYou 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 privateUnverified-project restriction. Complete Google's API compliance review to publish publicly.