
YouTube VideoTrigger
CertifiedTrigger flow on new channel uploads
YouTube VideoTrigger
Trigger flow on new channel uploads
Polls a channel's uploads playlist on a fixed interval (default PT1H with a 5m buffer) and starts a Flow when new videos publish. Uses an OAuth2 access token and checks up to maxResults items (default 5, YouTube limit 50). Videos already emitted are remembered in the KV store, so a video fires once even though consecutive polls overlap.
type: io.kestra.plugin.youtube.VideoTriggerExamples
Monitor channel for new videos
id: youtube_new_video_monitor
namespace: company.team
tasks:
- id: notify_slack
type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
url: "{{ secret('SLACK_WEBHOOK_URL') }}"
messageText: "New video: {{ trigger.title }} - {{ trigger.videoUrl }}"
triggers:
- id: new_video_trigger
type: io.kestra.plugin.youtube.VideoTrigger
accessToken: "{{ secret('YOUTUBE_ACCESS_TOKEN') }}"
channelId: "UC_x5XG1OV2P6uZZ5FSM9Ttw"
interval: PT1H
maxResults: 10
Properties
accessToken *string
Access token
OAuth2 bearer token used to call the YouTube Data API
channelId *string
Channel ID
YouTube channel ID whose uploads playlist is polled
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
applicationName string
kestra-yt-pluginApplication name
Application name sent to YouTube API; defaults to kestra-yt-plugin
interval string
PT1HdurationPolling interval
How often to check for new videos; defaults to PT1H
maxResults integerstring
5Maximum results
How many recent uploads to fetch per poll (1-50, default 5)
on string
CREATECREATEUPDATECREATE_OR_UPDATETrigger event type
CREATE: fires for videos the trigger has not emitted before.UPDATE: fires when a video it has already seen changes title while still inside the polling window.CREATE_OR_UPDATE: fires on either.
stateKey string
State key
KV key under which emitted videos are stored. Defaults to a key derived from the namespace, flow ID and trigger ID that is unique per trigger.
stateTtl string
State TTL
How long an emitted video is remembered, e.g. P30D. Defaults to 7 days. Values shorter than twice the look-back (interval plus 5 minutes) are raised to that minimum, so a video can't fire again while it is still inside the polling window.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
allNewVideos array
All new videos found
io.kestra.plugin.youtube.VideoTrigger-VideoData
date-timechannelId string
Channel ID
channelTitle string
Channel title
description string
Latest video description
newVideosCount integer
Count of new videos found
publishedAt string
date-timePublished timestamp (UTC)
thumbnailUrl string
Latest video thumbnail URL
title string
Latest video title
videoId string
Latest video ID
videoUrl string
Latest video watch URL