AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
feat(youtube): ui improvement (#16631)
Talal Jaberf4d9a10c056e
diff --git a/bun.lock b/bun.lockindex 6a122b4ea7c..a4039757fc3 100644--- a/bun.lock+++ b/bun.lock@@ -10235,7 +10235,7 @@},"packages/pieces/community/youtube": {"name": "@activepieces/piece-youtube",- "version": "0.8.1",+ "version": "0.9.0","dependencies": {"@activepieces/core-piece-types": "workspace:*","@activepieces/core-utils": "workspace:*",diff --git a/packages/pieces/community/youtube/package.json b/packages/pieces/community/youtube/package.jsonindex 9ae6c238dbc..59e5d7b20f9 100644--- a/packages/pieces/community/youtube/package.json+++ b/packages/pieces/community/youtube/package.json@@ -1,6 +1,6 @@{"name": "@activepieces/piece-youtube",- "version": "0.8.1",+ "version": "0.9.0","main": "./dist/src/index.js","types": "./dist/src/index.d.ts","dependencies": {diff --git a/packages/pieces/community/youtube/src/i18n/de.json b/packages/pieces/community/youtube/src/i18n/de.jsonindex 22e9d3d7e54..95c6942746f 100644--- a/packages/pieces/community/youtube/src/i18n/de.json+++ b/packages/pieces/community/youtube/src/i18n/de.json@@ -276,5 +276,8 @@"List Playlist Videos": "List Playlist Videos","List Comment Threads": "List Comment Threads","List Caption Tracks": "List Caption Tracks",- "Download Caption Track": "Download Caption Track"+ "Download Caption Track": "Download Caption Track",+ "Fill in Playlist ID or Item IDs, not both.": "Füllen Sie „Playlist ID“ oder „Item IDs“ aus, nicht beides.",+ "Fill in Channel ID or Handle.": "Füllen Sie „Kanal-ID“ oder „Handle“ aus.",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "Wird als ?key=value gesendet. Die meisten YouTube-Aufrufe brauchen part, zum Beispiel part=snippet."}diff --git a/packages/pieces/community/youtube/src/i18n/es.json b/packages/pieces/community/youtube/src/i18n/es.jsonindex b3fb96c5f17..0cc28fd4a9f 100644--- a/packages/pieces/community/youtube/src/i18n/es.json+++ b/packages/pieces/community/youtube/src/i18n/es.json@@ -276,5 +276,8 @@"List Playlist Videos": "List Playlist Videos","List Comment Threads": "List Comment Threads","List Caption Tracks": "List Caption Tracks",- "Download Caption Track": "Download Caption Track"+ "Download Caption Track": "Download Caption Track",+ "Fill in Playlist ID or Item IDs, not both.": "Rellena «Playlist ID» o «Item IDs», no ambos.",+ "Fill in Channel ID or Handle.": "Rellena «ID del canal» o «Manejo».",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "Se envía como ?key=value. La mayoría de las llamadas a YouTube necesitan part, por ejemplo part=snippet."}diff --git a/packages/pieces/community/youtube/src/i18n/fr.json b/packages/pieces/community/youtube/src/i18n/fr.jsonindex c7a4605a404..2c0daf1a4f5 100644--- a/packages/pieces/community/youtube/src/i18n/fr.json+++ b/packages/pieces/community/youtube/src/i18n/fr.json@@ -276,5 +276,8 @@"List Playlist Videos": "List Playlist Videos","List Comment Threads": "List Comment Threads","List Caption Tracks": "List Caption Tracks",- "Download Caption Track": "Download Caption Track"+ "Download Caption Track": "Download Caption Track",+ "Fill in Playlist ID or Item IDs, not both.": "Renseignez « Playlist ID » ou « Item IDs », pas les deux.",+ "Fill in Channel ID or Handle.": "Renseignez « ID du canal » ou « Poignée ».",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "Envoyé sous la forme ?key=value. La plupart des appels YouTube exigent part, par exemple part=snippet."}diff --git a/packages/pieces/community/youtube/src/i18n/ja.json b/packages/pieces/community/youtube/src/i18n/ja.jsonindex 5fdc7d503a6..d63223932c2 100644--- a/packages/pieces/community/youtube/src/i18n/ja.json+++ b/packages/pieces/community/youtube/src/i18n/ja.json@@ -276,5 +276,8 @@"List Playlist Videos": "List Playlist Videos","List Comment Threads": "List Comment Threads","List Caption Tracks": "List Caption Tracks",- "Download Caption Track": "Download Caption Track"+ "Download Caption Track": "Download Caption Track",+ "Fill in Playlist ID or Item IDs, not both.": "「プレイリストID」か「アイテムID」のどちらか一方だけを入力してください。",+ "Fill in Channel ID or Handle.": "「チャンネル ID」または「取扱先」を入力してください。",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "?key=value の形式で送信されます。YouTube の多くの呼び出しでは part(例: part=snippet)が必要です。"}diff --git a/packages/pieces/community/youtube/src/i18n/nl.json b/packages/pieces/community/youtube/src/i18n/nl.jsonindex 13f68a652f3..512d14be7bf 100644--- a/packages/pieces/community/youtube/src/i18n/nl.json+++ b/packages/pieces/community/youtube/src/i18n/nl.json@@ -276,5 +276,8 @@"List Playlist Videos": "List Playlist Videos","List Comment Threads": "List Comment Threads","List Caption Tracks": "List Caption Tracks",- "Download Caption Track": "Download Caption Track"+ "Download Caption Track": "Download Caption Track",+ "Fill in Playlist ID or Item IDs, not both.": "Vul \"Playlist ID\" of \"Item IDs\" in, niet allebei.",+ "Fill in Channel ID or Handle.": "Vul \"Kanaal ID\" of \"Handgreep\" in.",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "Wordt verzonden als ?key=value. De meeste YouTube-aanroepen hebben part nodig, bijvoorbeeld part=snippet."}diff --git a/packages/pieces/community/youtube/src/i18n/pt.json b/packages/pieces/community/youtube/src/i18n/pt.jsonindex 9edf22d6e6d..8609e8faa80 100644--- a/packages/pieces/community/youtube/src/i18n/pt.json+++ b/packages/pieces/community/youtube/src/i18n/pt.json@@ -276,5 +276,8 @@"List Playlist Videos": "List Playlist Videos","List Comment Threads": "List Comment Threads","List Caption Tracks": "List Caption Tracks",- "Download Caption Track": "Download Caption Track"+ "Download Caption Track": "Download Caption Track",+ "Fill in Playlist ID or Item IDs, not both.": "Preencha “Playlist ID” ou “Item IDs”, não ambos.",+ "Fill in Channel ID or Handle.": "Preencha “ID do canal” ou “Tratar”.",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "Enviado como ?key=value. A maioria das chamadas do YouTube precisa de part, por exemplo part=snippet."}diff --git a/packages/pieces/community/youtube/src/i18n/translation.json b/packages/pieces/community/youtube/src/i18n/translation.jsonindex 800c074fbfe..8af1143c5f0 100644--- a/packages/pieces/community/youtube/src/i18n/translation.json+++ b/packages/pieces/community/youtube/src/i18n/translation.json@@ -99,6 +99,7 @@"Video Syndicated": "Video Syndicated","Video Type": "Video Type","Video Caption": "Video Caption",+ "Markdown": "Markdown","Playlist ID": "Playlist ID","Item IDs": "Item IDs","Handle": "Handle",@@ -164,11 +165,13 @@"Video only. True: only videos other sites can embed.": "Video only. True: only videos other sites can embed.","Video only. True: only videos with paid promotions.": "Video only. True: only videos with paid promotions.","Video only. True: only videos that play outside youtube.com.": "Video only. True: only videos that play outside youtube.com.",+ "Fill in Playlist ID or Item IDs, not both.": "Fill in Playlist ID or Item IDs, not both.","The list= value in the playlist's URL. Leave empty to use Item IDs.": "The list= value in the playlist's URL. Leave empty to use Item IDs.","Comma-separated playlist item IDs, used instead of Playlist ID.": "Comma-separated playlist item IDs, used instead of Playlist ID.","How many items to return, up to 50.": "How many items to return, up to 50.","Only return entries for this video. Needs a Playlist ID.": "Only return entries for this video. Needs a Playlist ID.","A video ID, or several separated by commas: the v= value in the URL.": "A video ID, or several separated by commas: the v= value in the URL.",+ "Fill in Channel ID or Handle.": "Fill in Channel ID or Handle.","Starts with UC. Leave empty to look the channel up by Handle.": "Starts with UC. Leave empty to look the channel up by Handle.","The @name on the channel page. Used only when Channel ID is empty.": "The @name on the channel page. Used only when Channel ID is empty.","The channel's ID, which starts with UC.": "The channel's ID, which starts with UC.",@@ -220,7 +223,7 @@"Whether the video statistics are publicly visible. Leave Unchanged keeps the current value.": "Whether the video statistics are publicly visible. Leave Unchanged keeps the current value.","Self-declaration that the video is made for kids. Leave Unchanged keeps the current value.": "Self-declaration that the video is made for kids. Leave Unchanged keeps the current value.","Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",- "Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "Sent as ?key=value. Most YouTube calls need part, like part=snippet.","Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.","On a failed request, output the error instead of failing the step.": "On a failed request, output the error instead of failing the step.","Seconds to wait for a response. Empty: up to the flow limit (10 min).": "Seconds to wait for a response. Empty: up to the flow limit (10 min).",diff --git a/packages/pieces/community/youtube/src/i18n/zh.json b/packages/pieces/community/youtube/src/i18n/zh.jsonindex 6015dcfcd33..3a96d7839f9 100644--- a/packages/pieces/community/youtube/src/i18n/zh.json+++ b/packages/pieces/community/youtube/src/i18n/zh.json@@ -276,5 +276,8 @@"List Playlist Videos": "List Playlist Videos","List Comment Threads": "List Comment Threads","List Caption Tracks": "List Caption Tracks",- "Download Caption Track": "Download Caption Track"+ "Download Caption Track": "Download Caption Track",+ "Fill in Playlist ID or Item IDs, not both.": "填写“Playlist ID”或“Item IDs”,不要同时填写。",+ "Fill in Channel ID or Handle.": "填写“Channel ID”或“Handle”。",+ "Sent as ?key=value. Most YouTube calls need part, like part=snippet.": "以 ?key=value 的形式发送。大多数 YouTube 调用都需要 part,例如 part=snippet。"}diff --git a/packages/pieces/community/youtube/src/index.ts b/packages/pieces/community/youtube/src/index.tsindex e58282427cc..48370cce278 100644--- a/packages/pieces/community/youtube/src/index.ts+++ b/packages/pieces/community/youtube/src/index.ts@@ -39,6 +39,8 @@ import { youtubeListCommentThreadsAction } from './lib/actions/list-comment-threimport { youtubeListCaptionTracksAction } from './lib/actions/list-caption-tracks';import { youtubeDownloadCaptionTrackAction } from './lib/actions/download-caption-track';+const youtubeApiBaseUrl = 'https://www.googleapis.com/youtube/v3';+export const youtube = createPiece({displayName: 'YouTube',description:@@ -89,11 +91,21 @@ export const youtube = createPiece({youtubeListCaptionTracksAction,youtubeDownloadCaptionTrackAction,createCustomApiCallAction({- baseUrl: () => 'https://www.googleapis.com/youtube/v3',+ baseUrl: () => youtubeApiBaseUrl,auth: youtubeAuth,authMapping: async (auth) => ({Authorization: `Bearer ${(auth as OAuth2PropertyValue).access_token}`,}),+ props: {+ url: {+ description: `Full URL, or a path relative to ${youtubeApiBaseUrl}`,+ placeholder: '/channels?part=snippet&mine=true',+ },+ queryParams: {+ description:+ 'Sent as ?key=value. Most YouTube calls need part, like part=snippet.',+ },+ },}),],triggers: [youtubeNewVideoTrigger],diff --git a/packages/pieces/community/youtube/src/lib/actions/download-caption.ts b/packages/pieces/community/youtube/src/lib/actions/download-caption.tsindex d4ae2085a23..bc1c31b857f 100644--- a/packages/pieces/community/youtube/src/lib/actions/download-caption.ts+++ b/packages/pieces/community/youtube/src/lib/actions/download-caption.ts@@ -49,6 +49,22 @@ export const youtubeDownloadCaptionAction = createAction({advanced: true,}),},+ propertyGroups: [+ {+ key: 'caption',+ display: 'section',+ label: 'Caption',+ icon: 'file',+ props: ['captionId'],+ },+ {+ key: 'output',+ display: 'section',+ label: 'Output',+ icon: 'text',+ props: ['format', 'targetLanguage'],+ },+ ],async run(context) {const { captionId, format, targetLanguage, onBehalfOfContentOwner } =context.propsValue;diff --git a/packages/pieces/community/youtube/src/lib/actions/get-channel.ts b/packages/pieces/community/youtube/src/lib/actions/get-channel.tsindex 2961d9523fc..014f513a580 100644--- a/packages/pieces/community/youtube/src/lib/actions/get-channel.ts+++ b/packages/pieces/community/youtube/src/lib/actions/get-channel.ts@@ -1,5 +1,9 @@import { httpClient, HttpMethod } from '@activepieces/pieces-common';-import { createAction, Property } from '@activepieces/pieces-framework';+import {+ createAction,+ MarkdownVariant,+ Property,+} from '@activepieces/pieces-framework';import { youtubeAuth } from '../common/auth';import { getChannelOutputSchema } from '../output-schemas';@@ -17,6 +21,10 @@ export const youtubeGetChannelAction = createAction({idempotent: true,},props: {+ lookupInfo: Property.MarkDown({+ value: 'Fill in Channel ID or Handle.',+ variant: MarkdownVariant.INFO,+ }),channelId: Property.ShortText({displayName: 'Channel ID',description: 'Starts with UC. Leave empty to look the channel up by Handle.',@@ -30,6 +38,15 @@ export const youtubeGetChannelAction = createAction({required: false,}),},+ propertyGroups: [+ {+ key: 'channel',+ display: 'section',+ label: 'Channel',+ icon: 'user',+ props: ['lookupInfo', 'channelId', 'handle'],+ },+ ],async run(context) {const accessToken = context.auth.access_token;const { channelId, handle } = context.propsValue;diff --git a/packages/pieces/community/youtube/src/lib/actions/list-captions.ts b/packages/pieces/community/youtube/src/lib/actions/list-captions.tsindex c298727d39f..b10e08845f3 100644--- a/packages/pieces/community/youtube/src/lib/actions/list-captions.ts+++ b/packages/pieces/community/youtube/src/lib/actions/list-captions.ts@@ -39,6 +39,15 @@ export const youtubeListCaptionsAction = createAction({advanced: true,}),},+ propertyGroups: [+ {+ key: 'video',+ display: 'section',+ label: 'Video',+ icon: 'file',+ props: ['videoId'],+ },+ ],async run(context) {const { captionIds, onBehalfOfContentOwner, videoId } = context.propsValue;diff --git a/packages/pieces/community/youtube/src/lib/actions/list-comments.ts b/packages/pieces/community/youtube/src/lib/actions/list-comments.tsindex 8f15f044301..41695e81b0c 100644--- a/packages/pieces/community/youtube/src/lib/actions/list-comments.ts+++ b/packages/pieces/community/youtube/src/lib/actions/list-comments.ts@@ -51,6 +51,22 @@ export const youtubeListCommentsAction = createAction({advanced: true,}),},+ propertyGroups: [+ {+ key: 'video',+ display: 'section',+ label: 'Video',+ icon: 'file',+ props: ['videoId'],+ },+ {+ key: 'results',+ display: 'section',+ label: 'Results',+ icon: 'sliders',+ props: ['order', 'maxResults'],+ },+ ],async run(context) {const accessToken = context.auth.access_token;const { videoId, order, maxResults, pageToken } = context.propsValue;diff --git a/packages/pieces/community/youtube/src/lib/actions/list-playlist-items.ts b/packages/pieces/community/youtube/src/lib/actions/list-playlist-items.tsindex e76cf19d7bd..f5be20f7b9b 100644--- a/packages/pieces/community/youtube/src/lib/actions/list-playlist-items.ts+++ b/packages/pieces/community/youtube/src/lib/actions/list-playlist-items.ts@@ -1,4 +1,8 @@-import { createAction, Property } from '@activepieces/pieces-framework';+import {+ createAction,+ MarkdownVariant,+ Property,+} from '@activepieces/pieces-framework';import { httpClient, HttpMethod } from '@activepieces/pieces-common';import { youtubeAuth } from '../common/auth';import { listPlaylistItemsOutputSchema } from '../output-schemas';@@ -15,6 +19,10 @@ export const youtubeListPlaylistItemsAction = createAction({audience: 'human',aiMetadata: { description: 'Lists the entries of a YouTube playlist in one of two modes: pass a playlist ID to page through that whole playlist (optionally narrowed to entries containing one video ID), or pass a comma-separated list of playlist item IDs to fetch only those entries. Exactly one of the two is required, supplying both or filtering by video without a playlist ID fails validation, and Max Results is capped at 50 with further pages fetched via the page token. Run Search with type Playlist first when the playlist ID is unknown; read-only and idempotent.', idempotent: true },props: {+ sourceInfo: Property.MarkDown({+ value: 'Fill in Playlist ID or Item IDs, not both.',+ variant: MarkdownVariant.INFO,+ }),playlistId: Property.ShortText({displayName: 'Playlist ID',description:@@ -55,6 +63,22 @@ export const youtubeListPlaylistItemsAction = createAction({advanced: true,}),},+ propertyGroups: [+ {+ key: 'playlist',+ display: 'section',+ label: 'Playlist',+ icon: 'file',+ props: ['sourceInfo', 'playlistId', 'itemIds'],+ },+ {+ key: 'results',+ display: 'section',+ label: 'Results',+ icon: 'sliders',+ props: ['maxResults'],+ },+ ],async run(context) {const { playlistId, itemIds, maxResults, pageToken, videoId } =context.propsValue;diff --git a/packages/pieces/community/youtube/src/lib/actions/list-playlists.ts b/packages/pieces/community/youtube/src/lib/actions/list-playlists.tsindex 7d622f1781d..cdfffb25b2f 100644--- a/packages/pieces/community/youtube/src/lib/actions/list-playlists.ts+++ b/packages/pieces/community/youtube/src/lib/actions/list-playlists.ts@@ -40,6 +40,22 @@ export const youtubeListPlaylistsAction = createAction({advanced: true,}),},+ propertyGroups: [+ {+ key: 'channel',+ display: 'section',+ label: 'Channel',+ icon: 'user',+ props: ['channelId'],+ },+ {+ key: 'results',+ display: 'section',+ label: 'Results',+ icon: 'sliders',+ props: ['maxResults'],+ },+ ],async run(context) {const accessToken = context.auth.access_token;const { channelId, maxResults, pageToken } = context.propsValue;diff --git a/packages/pieces/community/youtube/src/lib/actions/search.ts b/packages/pieces/community/youtube/src/lib/actions/search.tsindex 94d715046d6..f156e2e7e1c 100644--- a/packages/pieces/community/youtube/src/lib/actions/search.ts+++ b/packages/pieces/community/youtube/src/lib/actions/search.ts@@ -116,11 +116,13 @@ export const youtubeSearchAction = createAction({displayName: 'Published After',description: 'Only results published on or after this date.',required: false,+ width: 'half',}),publishedBefore: Property.DateTime({displayName: 'Published Before',description: 'Only results published before this date.',required: false,+ width: 'half',}),maxResults: Property.Number({displayName: 'Max Results',@@ -317,6 +319,29 @@ export const youtubeSearchAction = createAction({},}),},+ propertyGroups: [+ {+ key: 'query',+ display: 'section',+ label: 'Search for',+ icon: 'filter',+ props: ['query', 'type', 'channelId'],+ },+ {+ key: 'published',+ display: 'section',+ label: 'Published',+ icon: 'calendar',+ props: ['publishedAfter', 'publishedBefore'],+ },+ {+ key: 'results',+ display: 'section',+ label: 'Results',+ icon: 'sliders',+ props: ['order', 'maxResults'],+ },+ ],async run(context) {const {channelId,