View as Markdown
YouTube Data icon

YouTube Data ACTION

Create Playlist

Creates a playlist. See the documentation for more information
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's YouTube Data account once, then configure and run Create Playlist from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "youtube_data_api-create-playlist",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    youtube_data_api: { authProvisionId: "apn_xxxxxxx" },
    title: "Title",
    description: "Description",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Playlist inputs
Property Type Description
title Title string
The playlist's title
Required
description Description string
The playlist's description
Optional
privacyStatus Privacy Status string
The playlist's privacy status
Optional
onBehalfOfContentOwner On Behalf Of Content Owner string

This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.

Optional
onBehalfOfContentOwnerChannel On Behalf Of Content Owner Channel string

This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners.

The onBehalfOfContentOwnerChannel parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies.

Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
youtube_data_api-create-playlist
Version
0.0.4
App
YouTube Data
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes