Skip to content

YouTube

CLI examples for YouTube video scheduling in OpenQuok

1 min read

Connect your agent today

Draft from chat, review in your calendar, and publish only what you approve.

Start for $0

Channel quick reference

PropertyValue
Provider identifieryoutube
Max description length5,000 characters (-c body)
Required attachmentsExactly one .mp4 video
OAuth setupYouTube
YT_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="youtube") | .id')

Video with title and privacy

The post body becomes the YouTube description. Set title and privacy in providerSettingsByIntegrationId:

test -f ./walkthrough.mp4 && test -s ./walkthrough.mp4
VIDEO=$(openquok upload ./walkthrough.mp4 | jq -c '[{id: .data.id, path: (.data.path // .data.filePath)}]')
openquok posts:create 
  -c "Full product walkthrough — links in description." 
  -m "$VIDEO" 
  -s "2026-01-01T12:00:00Z" 
  -i "<youtube-integration-id>" 
  --providerSettingsByIntegrationId '{"<youtube-integration-id>":{"title":"OpenQuok walkthrough","type":"public","selfDeclaredMadeForKids":"no"}}'

With tags and nested youtube bucket

The backend accepts flat keys and a nested youtube bucket (same shape as the web composer):

openquok posts:create 
  -c "Scheduled from the CLI." 
  -m "$VIDEO" 
  -s "2026-01-01T12:00:00Z" 
  -i "<youtube-integration-id>" 
  --providerSettingsByIntegrationId '{"<youtube-integration-id>":{"youtube":{"title":"Weekly update","type":"unlisted","selfDeclaredMadeForKids":"no","tags":[{"value":"update","label":"update"},{"value":"product","label":"product"}]}}}'

With custom thumbnail

Upload a still image, then pass its storage path in settings:

test -f ./thumb.jpg && test -s ./thumb.jpg
THUMB_PATH=$(openquok upload ./thumb.jpg | jq -r '.data.path // .data.filePath')
openquok posts:create 
  -c "See chapters in the description." 
  -m "$VIDEO" 
  -s "2026-01-01T12:00:00Z" 
  -i "<youtube-integration-id>" 
  --providerSettingsByIntegrationId "$(jq -nc --arg id "<youtube-integration-id>" --arg thumb "$THUMB_PATH" '{($id):{title:"Launch recap",type:"public",selfDeclaredMadeForKids:"no",thumbnail:{path:$thumb}}}')"

Flat settings on a single channel

When -i lists one integration, --settings merges the same keys:

openquok posts:create 
  -c "Private draft upload for review." 
  -m "$VIDEO" 
  -s "2026-01-01T12:00:00Z" 
  -i "<youtube-integration-id>" 
  --settings '{"title":"Internal review cut","type":"private","selfDeclaredMadeForKids":"no"}'

Resolve integration UUID

YT_ID=$(openquok integrations:list | jq -r '.[] | select(.identifier=="youtube") | .id')
openquok integrations:settings "$YT_ID"
openquok analytics:platform "$YT_ID" -d 30

Post insights

POST_ID=$(openquok posts:list | jq -r '.items[] | select(.identifier=="youtube") | .id' | head -1)
openquok analytics:post "$POST_ID" -d 7
Search documentation
Find a docs page
Discord Support