Skip to content

Playlist Item

Playlist Item connects your flow to your YouTube channel to manage the videos a playlist contains: see which videos it has, add a video at the position you want, move it to another position or remove it from the playlist.

Each video inside a playlist is an item with its own ID, different from the video’s ID. That item ID is the one used to move or remove it.

When to use it

  • Add every new video of a course to its playlist as soon as it is published.
  • Put the latest video in the first position of the “what’s new” playlist.
  • Check which videos a playlist has to send the index to students.
  • Remove videos that are no longer current from a playlist.

Configuration

You need a Youtube API credential, which connects by signing in with your Google account. When you create it you must enter the Client ID and Client Secret of your own Google Cloud project. See Credentials.

FieldWhat it does
Credential (required)The Youtube API credential used to access your channel.
OperationWhat the component does. See Operations. Default: Get Playlist Items.
Item IDThe ID of the playlist item. You find it in the id field of the Get Playlist Items result. Required in Delete Playlist Item and Update Playlist Item. In Get Playlist Items, it returns only that item. It does not appear in Create Playlist Item.
Playlist IDThe playlist’s ID or link. Required in Create Playlist Item. In Get Playlist Items, it returns the videos of that playlist; fill in this field or Item ID.
Max ResultsOnly in Get Playlist Items. The maximum number of videos to return. Default: 10.
Video IDOnly in Create Playlist Item, where it is needed. The ID or link of the video you want to add.
IndexIn Create Playlist Item and Update Playlist Item. The video’s position in the playlist, starting at 0 for the first one. Default: 0.

Operations

OperationWhat it does
Get Playlist ItemsReturns the videos of a playlist, or one item from its Item ID.
Create Playlist ItemAdds a video to the playlist at the position given in Index.
Delete Playlist ItemRemoves a video from the playlist. The video is not deleted from YouTube.
Update Playlist ItemMoves a video to the position given in Index.

Output

The Result output returns one item per playlist video you worked with: the item ID (id), the video’s title and description, its image, the video ID (video_id), the playlist ID (playlist_id), its position (position) and its privacy. Delete Playlist Item returns a confirmation.

You can connect the result to an email component to send the playlist index, or to an agent. The component can also be connected to an Agent as a tool. See Tool Mode.

Example

An academy adds every new lesson to its course playlist.

  1. When the lesson is uploaded, the flow receives the video link.
  2. Add Playlist Item with the Create Playlist Item operation.
  3. Paste the course playlist link in Playlist ID and the video link in Video ID.
  4. In Index, enter the lesson number minus one so it lands in place: lesson 1 at position 0, lesson 2 at 1, and so on.

Good practices

  • To move or remove a video use the Item ID, not the video ID. If you don’t have it, get it first with Get Playlist Items.
  • You can only change the playlists of your own channel.
  • Playlist: creates and manages playlists.
  • Video: uploads and manages videos.