Announce new YouTube uploads in Discord

By General Input

Automatically post a rich embed to your Discord server the moment a new video goes up on your YouTube channel.

Integrations

  • YouTube
  • Discord

Type

Deterministic Code

Categories

  • Marketing

Every 15 minutes, check my YouTube channel for new uploads and announce each one in a Discord channel as a rich embed. This is fully deterministic — no reasoning, no drafting — so build it as a code workflow with concrete steps.

Trigger: cron on a 15 minute cadence. YouTube does not send outgoing webhooks for uploads and is not a first-class poll provider on the platform, so the cron + list pattern is the right shape here. 15 minutes is a sensible default because YouTube's Search Videos costs 100 quota units per call and the daily quota is 10,000 units.

Configuration (both user-configurable at workflow install time):

1) youtubeChannelId — the YouTube channel to monitor (a UC... string).

2) discordChannelId — the Discord channel to post announcements into.

Workflow state: persist lastSeenPublishedAt (ISO 8601 timestamp). On the very first run, if it is unset, initialize it to the current time so we do not backfill the whole channel history — we only announce videos uploaded from now onward.

Step 1 — Fetch new videos with YouTube's Search Videos operation. Pass channelId = youtubeChannelId, order = date, type = video, publishedAfter = lastSeenPublishedAt, and a small maxResults (e.g. 10). Search results use items[].id.videoId (not items[].id), so parse accordingly.

Step 2 — If there are zero new items, exit early without touching state. Otherwise sort the returned items by snippet.publishedAt ascending so we announce oldest-first.

Step 3 — For each new video, build a Discord embed with: title = the video title, description = the first 200 characters of the video description (trim trailing whitespace, append an ellipsis if truncated), url = https://www.youtube.com/watch?v=<videoId>, thumbnail.url = the highest-resolution thumbnail available on snippet.thumbnails (prefer maxres, then high, then medium, then default), and color = 0xED4245 (Discord's red).

Step 4 — Call Discord's Send a Message operation to discordChannelId with that embed. Send them in publish order.

Step 5 — Only after every message posts successfully, update lastSeenPublishedAt to the newest snippet.publishedAt from this batch. If any Discord post fails, do not advance the cursor — the next run will retry from where we left off, so we never lose a video and never double-post.

Related prompts

Explore more prompts
Discord support triage board for unanswered questionsDiscord announcement publishing desk with live previewTurn your Discord server into a working member directoryMonday brief: what competitors are pitching on YouTubeMatch-day fantasy football injury and lineup briefWeekly Discord community pulse digestAnnounce new GitHub releases in DiscordRoute Typeform feedback into the right Discord channelTurn new YouTube uploads into WordPress blog postsDaily YouTube channel stats log to Google Sheets