Connect YouTube to Fondoo

Live6 min readUpdated

Connecting YouTube lets Fondoo upload your real videos to your business's YouTube channel. Your AI agent can write the title and description, schedule each upload into a time slot and publish it once approved. Fondoo then collects basic video stats.

You don't create a Google Cloud project or API keys. Fondoo posts through its own account with Upload-Post, a social posting service that brings its own YouTube API quota. You sign in with Google once on a secure page and approve access.

What Fondoo can do with it

  • Write drafts. draft_social_posts writes the text from your idea, a site page or release notes. save_social_draft saves text you wrote yourself. Drafts are never sent.
  • Schedule and publish videos. schedule_social_posts places an upload in a free slot within your posting windows. The background job publish_due_social_posts uploads it when it's due.
  • Video only. Each post is exactly one video. Fondoo uses the first 100 characters of your text as the video title and the full text as the description, so put the title first.
  • Stats. sync_social_stats saves metrics every hour, and you read them with get_social_stats. Metrics YouTube doesn't report stay empty.
  • Not supported from Fondoo: choosing public, unlisted or private, custom thumbnails, playlists, category, the "made for kids" setting and the altered or synthetic content label. Fondoo doesn't send these, so Upload-Post's defaults apply (see "Before you start").

What needs your approval:

  • approve_social_posts is marked destructive when YouTube's approval setting is review (the default) or manual. Agent uploads wait under Needs your OK on Home until you click Approve (this runs decide_approval).
  • With approval: "auto", agent uploads are scheduled without asking. Automated batches of more than 20 posts a day still need your OK.
  • cancel_post is destructive, so the agent needs your approval to cancel.
  • Only the owner can change posting rules (update_distribution_rules).

Before you start

  • A Google account with a YouTube channel. If the channel belongs to a Brand Account, make sure you can choose it when you sign in.
  • Videos go public. Upload-Post's defaults are privacyStatus public, not made for kids, no synthetic media label and notify subscribers (Upload-Post YouTube guide, upload parameters). Because Fondoo doesn't change these, every upload is public as soon as it's published. If your content is made for kids or needs a disclosure, update it in YouTube Studio or don't post it through Fondoo.
  • Video files. Upload with register_social_media as MP4 or WebM, up to 20 MiB, and only real video (provenance: "real_video"). That size suits short clips. YouTube treats videos of 180 seconds or less that are vertical or square as Shorts (Upload-Post YouTube guide).
  • Channel verification. YouTube needs a verified account for videos over 15 minutes (YouTube Help). This is unlikely to matter within the 20 MiB limit.
  • Costs. You don't need your own Upload-Post plan or Google Cloud quota. The current code adds no per-post charge for YouTube. AI drafts use one AI post unit per idea from your plan's allowance. Scheduling text you wrote yourself uses none. How many social sets you get (one account per network each) depends on your plan.

Step by step: authorize your account

  1. Ask your agent to connect YouTube, or call connect_social yourself (see below). You get a url and a connectionId.
  2. Open the url. It is an Upload-Post page titled "Connect ". Upload-Post documents these links as valid for 48 hours (Upload-Post: user profile integration).
  3. Choose YouTube. Google asks you to pick an account. Choose the account or Brand Account that owns the channel.
  4. Google lists what the app may do, such as managing your YouTube account or uploading videos. The app shown may be Upload-Post rather than Fondoo, and the exact wording may differ. YouTube uploads need an upload or manage permission (YouTube Data API: videos.insert). Approve.
  5. Go back to Fondoo. You never paste a password or token into Fondoo or chat. Upload-Post stores the authorization.
  6. Ask your agent to run refresh_social_accounts with the connectionId.

Connect it in Fondoo

To get the setup steps as a link, your agent can call connect_service({provider:"youtube", siteId}) (REST: POST /v1/ops/connect_service). It returns a signed link, valid for 15 minutes, plus a QR code and these setup steps. That link only shows instructions. The page where you actually sign in to YouTube comes from connect_social, below.

(a) In the dashboard. Go to Connections. Under Available, find Connect YouTube in the Social group, or search in Find a tool. Fondoo shows Continue connecting and a Connect securely button. That opens a signed setup link with these steps, which expires after 15 minutes. The Google sign-in page itself comes from connect_social, so asking your agent is quickest. Once connected, YouTube appears under Connected with a Reconnect button. The Social page's composer only sends text, so use your agent to upload videos.

(b) Ask your agent. Example prompt:

Connect our YouTube channel and send me the link. After I approve, refresh accounts. Then upload this real demo clip, titled "How to set up your order in 60 seconds", for Thursday afternoon.

The agent calls:

  1. connect_social with { "siteId": "<site-id>", "provider": "upload_post", "network": "youtube", "redirectUrl": "https://example.com/connected", "set": 1 }. Don't send an idempotencyKey, because it is rejected.
  2. refresh_social_accounts with { "siteId": "<site-id>", "connectionId": "<connectionId>" }.
  3. register_social_media with type: "video/mp4", filename, alt, provenance: "real_video" and confirmedReal: true. The file goes in base64 or a site storageKey.
  4. schedule_social_posts with { "siteId": "<site-id>", "variants": [{ "accountId": "<account-id>", "text": "<title first, then description>", "format": "video", "mediaIds": ["<media-id>"] }], "scheduledAt": "<ISO time>" }.

Turn YouTube on for posting (human owner only). Read the current rules with get_distribution_rules, then call update_distribution_rules, which replaces the whole set. Example rule: { "network": "youtube", "cadence": 1, "windows": [{ "days": [1,2,3,4,5], "start": 780, "end": 1080 }], "formats": ["video"], "approval": "review" }. The rule's default format is text, which YouTube rejects, so list video.

REST equivalent:

curl -X POST https://api.getfondoo.com/v1/ops/connect_social \
  -H "Authorization: Bearer $FONDOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"siteId":"<site-id>","provider":"upload_post","network":"youtube","redirectUrl":"https://example.com/connected"}'

MCP agents (https://api.getfondoo.com/mcp) use find_tools and call_tool.

Test that it works

  1. list_social_accounts shows YouTube as active, with your channel's name.
  2. Pick a short real clip you're happy to have public, then schedule it. Agents can add "dryRun": true to schedule_social_posts to preview first.
  3. Watch get_social_calendar or get_post until the status is published. Check the video in YouTube Studio, where you can change its visibility or audience if needed.
  4. After about an hour, get_social_stats should show a snapshot.

Troubleshooting

  • "Format not supported by this adapter/network" or "Media/thread do not match the selected format": YouTube posts must use format: "video" with exactly one video file.
  • "Enable youtube in distribution rules first" or "Format disabled by distribution rules": the owner adds a YouTube rule with video in formats.
  • "youtube character limit (5000) exceeded after link tracking": YouTube text is counted in bytes, and tracked links add length. Shorten the description.
  • "Media must be canonical base64, 1 byte to 20 MiB": the file is too big. Trim or compress the video.
  • Wrong channel connected, or "A social set supports one account per network": each set holds one YouTube channel. To add a second channel, use "set": 2. To swap, remove access (see below), reconnect and refresh.
  • "Social account is disconnected" or uploads failing after months: reconnect with a new connect_social link, then run refresh_social_accounts. Upload-Post says YouTube sessions typically last about 6 months (Upload-Post FAQ).

Limits, data and security

  • Text: the title is the first 100 characters. The description is up to 5,000 bytes (Upload-Post character limits).
  • Daily cap: Fondoo's default is 10 YouTube uploads per channel per UTC day, matching Upload-Post's limits page (Upload-Post upload limits). Upload-Post's FAQ lists a higher figure, so this may differ for your account. Unless the owner changes the rules, the default is one upload a day between 09:00 and 17:00 UTC. get_publishing_capacity shows what's left today.
  • Failures: Fondoo retries with growing waits. If an upload keeps failing or stays unconfirmed for 24 hours, Fondoo marks it failed and alerts you. It never resends blindly.
  • What Fondoo stores: channel ID and name, post text and video, tracked links and hourly metric snapshots. Fondoo never sees your Google password or YouTube token, because Upload-Post holds the authorization.
  • Deleting videos: Fondoo can't delete a published video. Delete it in YouTube Studio. cancel_post works only before an upload goes out.
  • Disconnect: go to myaccount.google.com/linkedapps, choose Access to your Google Account, select the app, then See details > Remove access > Confirm (Google Account Help). Cancel any scheduled YouTube posts first, then run refresh_social_accounts. There are no keys to rotate.