YouTube#
YouTube is an online video-sharing platform. YouTube allows users to upload, view, rate, share, add to playlists, report, comment on videos, and subscribe to other users.
Credentials
You can find authentication information for this node here.
Basic Operations#
- Channel
- Retrieve a channel
- Retrieve all channels
- Update a channel
- Upload a channel banner
- Playlist
- Create a playlist
- Delete a playlist
- Get a playlist
- Retrieve all playlists
- Update a playlist
- Playlist Item
- Add an item to a playlist
- Delete a item from a playlist
- Get a playlist's item
- Retrieve all playlist items
- Video
- Delete a video
- Get a video
- Retrieve all videos
- Rate a video
- Update a video
- Upload a video
- Video Category
- Retrieve all video categories
Example Usage#
This workflow allows you to upload a video, create a playlist, and add the video to the playlist in YouTube. You can also find the workflow on n8n.io. This example usage workflow would use the following nodes. - Start - Read Binary File - YouTube
The final workflow should look like the following image.
1. Start node#
The start node exists by default when you create a new workflow.
2. Read Binary File node#
- Enter the path to the video file you want to upload in the File Path field.
- Click on Execute Node to run the node.
3. YouTube node (upload: video)#
- First of all, you'll have to enter credentials for the YouTube node. You can find out how to do that here.
- Select 'Video' from the Resource dropdown list.
- Select 'Upload' from the Operation dropdown list.
- Enter the title of the video in the Title field.
- Select the region code from Region Code dropdown list.
- Select the video category from the Category ID dropdown list.
- Click on Execute Node to run the node.
4. YouTube1 node (create: playlist)#
- Select the credentials that you entered in the previous YouTube node.
- Select 'Playlist' from the Resource dropdown list.
- Select 'Create' from the Operation dropdown list.
- Enter the title of the playlist in the Title field.
- Click on Execute Node to run the node.
5. YouTube2 node (add: playlistItem)#
- Select the credentials that you entered in the previous YouTube node.
- Select 'Playlist Item' from the Resource dropdown list.
- Select the playlist from the Playlist ID dropdown list.
- Click on the gears icon next to the Video ID field and click on Add Expression.
- Select the following in the Variable Selector section: Nodes > YouTube > Output Data > JSON > id. You can also add the following expression:
{{$node["YouTube"].json["id"]}}
. - Click on Execute Node to run the node.