← YouTube (Data API)

List Playlists with YouTube (Data API) API

Pipedream makes it easy to connect APIs for YouTube (Data API) and 900+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
List Playlists with the YouTube (Data API) API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Create a workflow to List Playlists with the YouTube (Data API) API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the List Playlists action
    1. Connect your YouTube (Data API) account
    2. Select a Use Case
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

List Playlists with YouTube (Data API) API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + YouTube (Data API)
 
Try it
List Playlists with YouTube (Data API) API on New Message from Discord API
Discord + YouTube (Data API)
 
Try it
List Playlists with YouTube (Data API) API on New Message in Channel from Discord Bot API
Discord Bot + YouTube (Data API)
 
Try it
List Playlists with YouTube (Data API) API on New Submission from Typeform API
Typeform + YouTube (Data API)
 
Try it
List Playlists with YouTube (Data API) API on Custom Events from Zoom API
Zoom + YouTube (Data API)
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

List Playlists on YouTube (Data API)
Description:Returns a collection of playlists that match the API request parameters. [See the docs](https://developers.google.com/youtube/v3/docs/playlists/list) for more information
Version:0.0.1
Key:youtube_data_api-list-playlists

Code

import youtubeDataApi from "../../youtube_data_api.app.mjs";
import consts from "../../consts.mjs";

export default {
  key: "youtube_data_api-list-playlists",
  name: "List Playlists",
  description: "Returns a collection of playlists that match the API request parameters. [See the docs](https://developers.google.com/youtube/v3/docs/playlists/list) for more information",
  version: "0.0.1",
  type: "action",
  props: {
    youtubeDataApi,
    useCase: {
      propDefinition: [
        youtubeDataApi,
        "useCase",
      ],
      options: consts.LIST_PLAYLISTS_USE_CASE,
    },
  },
  async additionalProps() {
    const dynamicProps = {};
    if (this.useCase === "id") {
      dynamicProps.id = {
        ...youtubeDataApi.propDefinitions.playlistId,
      };
    }
    else if (this.useCase === "channelId") {
      dynamicProps.channelId = {
        ...youtubeDataApi.propDefinitions.channelId,
      };
    }
    return {
      ...dynamicProps,
      part: {
        ...youtubeDataApi.propDefinitions.part,
        options: consts.LIST_PLAYLISTS_PART_OPTS,
      },
      hl: {
        ...youtubeDataApi.propDefinitions.hl,
        options: async () => {
          return await this.youtubeDataApi.listI18nLanguagesOpts();
        },
      },
      maxResults: {
        ...youtubeDataApi.propDefinitions.maxResults,
      },
      onBehalfOfContentOwner: {
        ...youtubeDataApi.propDefinitions.onBehalfOfContentOwner,
      },
      onBehalfOfContentOwnerChannel: {
        ...youtubeDataApi.propDefinitions.onBehalfOfContentOwnerChannel,
      },
    };
  },
  async run({ $ }) {
    const {
      useCase,
      id,
      channelId,
      part,
      hl,
      maxResults,
      onBehalfOfContentOwner,
      onBehalfOfContentOwnerChannel,
    } = this;

    const mine = useCase === "mine" ?
      true :
      undefined;

    const playlists = (await this.youtubeDataApi.listPlaylists({
      part,
      id,
      mine,
      channelId,
      hl,
      onBehalfOfContentOwner,
      onBehalfOfContentOwnerChannel,
      maxResults,
    })).data;
    $.export("$summary", `Successfully fetched "${playlists.items.length}" playlists`);
    return playlists;
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
YouTube (Data API)youtubeDataApiappThis component uses the YouTube (Data API) app.
Use CaseuseCasestringSelect a value from the drop down menu:{ "label": "By playlist id", "value": "id" }{ "label": "All playlists for a channel", "value": "channelId" }{ "label": "My playlists", "value": "mine" }

Authentication

YouTube (Data API) uses OAuth authentication. When you connect your YouTube (Data API) account, Pipedream will open a popup window where you can sign into YouTube (Data API) and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any YouTube (Data API) API.

Pipedream requests the following authorization scopes when you connect your account:

emailprofilehttps://www.googleapis.com/auth/youtube.readonlyhttps://www.googleapis.com/auth/youtube.uploadhttps://www.googleapis.com/auth/youtube

About YouTube (Data API)

Online video platform

More Ways to Use YouTube (Data API)

Triggers

New Liked Videos from the YouTube (Data API) API

Emit new event for each new Youtube video liked by the authenticated user.

 
Try it
New Subscriber from the YouTube (Data API) API

Emit new event for each new Youtube subscriber to user Channel.

 
Try it
New Subscription from the YouTube (Data API) API

Emit new event for each new subscription from authenticated user.

 
Try it
New Videos from the YouTube (Data API) API

Emit new event for each new Youtube video the user posts.

 
Try it
New Videos by Location from the YouTube (Data API) API

Emit new event for each new YouTube video tied to a location.

 
Try it

Actions

Channel Statistics with the YouTube (Data API) API

Returns statistics from my YouTube Channel or by id. See the docs for more information

 
Try it
List Activities with the YouTube (Data API) API

Returns a list of channel activity events that match the request criteria. See the docs for more information

 
Try it
List Videos with the YouTube (Data API) API

Returns a list of videos that match the API request parameters. See the docs for more information

 
Try it
Update Playlist with the YouTube (Data API) API

Modifies a playlist. For example, you could change a playlist's title, description, or privacy status. If you are submitting an update request, and your request does not specify a value for a property that already has a value, the property's existing value will be deleted. See the docs for more information

 
Try it
Upload Video with the YouTube (Data API) API

Post a video to your channel. See the docs for more information

 
Try it