VideoTrigger icon
Log icon
DiscordIncomingWebhook icon

Announce New YouTube Uploads to Discord Automatically

Announce new YouTube uploads to Discord with Kestra. A polling trigger detects channel uploads and posts title, link, and publish time automatically.

Categories
Business

Your community should hear about a new video from you, not from the algorithm. This blueprint attaches io.kestra.plugin.youtube.VideoTrigger to a channel: every 30 minutes it checks for uploads it has not seen before, and the moment one appears it starts an execution that posts a ready-made announcement to Discord, title, watch link, and publish time already filled in. No one has to remember to post, and the announcement lands while the video is still fresh.

How it works

  1. on_new_video (io.kestra.plugin.youtube.VideoTrigger) polls the channel on a PT30M interval with the OAuth2 access token. When new uploads appear, it fires with scalar outputs for the latest video, title, videoId, videoUrl, channelTitle, publishedAt, and thumbnailUrl, plus newVideosCount and an allNewVideos array.
  2. log_upload writes the detection to the execution logs, giving announcement history a searchable audit trail.
  3. announce interpolates the scalar trigger outputs into a Discord webhook message. Only scalars enter the JSON payload; the allNewVideos array stays on the execution for inspection.
  4. The errors block posts a distinct Discord alert when the announcement fails.
  5. The trigger ships disabled: true; point channelId at your channel and enable it to go live.

What you get

  • Announcements that consistently beat manual posting, bounded by the polling interval.
  • The video title, URL, and publish time injected automatically, so the message is never half-filled.
  • Deduplication handled by the trigger; a video is announced once, not on every poll.
  • A searchable log line per detection and an alert when the pipeline itself breaks.

Who it's for

  • Creators and developer relations teams running a Discord community alongside a YouTube channel.
  • Marketing teams who want launch videos amplified the moment they go public.
  • Community managers replacing a "someone paste the link" ritual with automation.

Why orchestrate this with Kestra

The YouTube API can tell you a video exists; turning that into a reliable announcement still needs polling, state to avoid duplicates, a place to run, and an alert when the token dies. Kestra's trigger handles the polling and dedup state, the execution history shows every announcement ever sent, and the errors block guarantees a silent failure never costs you a launch window.

Prerequisites

  • A Google Cloud project with the YouTube Data API v3 enabled and an OAuth2 access token with read scope. Pair with the YouTube token refresh blueprint to keep it fresh.
  • The channel ID to watch (from the channel's About page or the API).
  • A Discord incoming webhook in the announcement channel.

Secrets

  • YOUTUBE_ACCESS_TOKEN: OAuth2 bearer token for the YouTube Data API.
  • DISCORD_WEBHOOK_URL: Discord incoming webhook URL.

Quick start

  1. Add the two secrets to your Kestra namespace.
  2. Replace the sample channelId with your channel's ID.
  3. Set disabled: false on the on_new_video trigger and upload or schedule a video to see the announcement arrive.

How to extend

  • Shorten interval for faster announcements, keeping YouTube API quota in mind.
  • Add a task that posts the same announcement to Slack or sends it as an email newsletter trigger.
  • Feed {{ trigger.videoId }} into the YouTube stats to warehouse blueprint a day later to measure launch performance.
  • Use {{ trigger.thumbnailUrl }} inside a Discord embed for a richer announcement card.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.