YouTube Integration
Dispatch integrates with YouTube via Google's PubSubHubbub push notification service so creators can route new uploads into Discord, Slack, Telegram, Google Chat, or Webex without polling the API or managing webhook URLs.
Connecting YouTube
- Go to your project's Sources page.
- Click Add source, then YouTube.
- Sign in with the Google account that owns the YouTube channel.
- Pick a channel from the list and click Subscribe.
Dispatch generates a signing secret, registers a WebSub subscription with the hub for your channel's video feed, and sets up an endpoint with provider = "youtube". Subsequent uploads on that channel arrive as webhook events at your endpoint.
You can subscribe to additional channels from the same connection — each becomes its own source with its own ingress URL and signing secret.
Supported Events
| Event | Description |
|---|---|
youtube.video.published | A new video was uploaded or its metadata was updated |
youtube.video.deleted | A video was deleted or made private |
YouTube fires the published event for both the initial upload and any later metadata edits (title, description, thumbnail). Each notification is deduplicated by the entry's updated timestamp so genuine edits flow through as distinct events while retries are collapsed.
Required Scopes
Dispatch requests only the read-only YouTube scope at sign-in:
| Scope | Used for |
|---|---|
https://www.googleapis.com/auth/youtube.readonly | Listing the channels you own so you can pick which to subscribe to |
Dispatch never writes to your YouTube account.
Signature Verification
The hub signs every notification with HMAC-SHA1 over the raw request body using the secret Dispatch provided when subscribing. Dispatch verifies this on every request:
X-Hub-Signature: sha1=<hex>
Notifications without a matching signature are rejected.
Subscription Lifecycle
The WebSub hub leases subscriptions for up to about 10 days. Dispatch requests the maximum lease at subscribe time. After the lease expires the hub stops delivering until you resubscribe. To resubscribe, open the YouTube source dialog and click Subscribe on the channel again — the endpoint URL and signing secret stay the same so any downstream routing keeps working.
Auto-Formatted Embeds
When no custom template is assigned, Dispatch detects YouTube payloads and renders embeds with:
- Title and link to the new video
- Channel name and channel URL as the author
- Thumbnail from
hqdefault.jpg - Published / updated timestamp
The YouTube channel name appears in the footer.
Disconnecting
To disconnect a single channel: open the YouTube source dialog and click Disconnect next to the channel, or remove the source from the Sources page.
To remove the YouTube connection entirely: open the YouTube source dialog and click Disconnect in the header. Dispatch unsubscribes every WebSub subscription it created on your behalf, then removes the OAuth connection and the endpoints. You can reconnect at any time.