1. Opening Problem Statement
Meet Dinar, a content curator for an AI news aggregator YouTube channel. Every morning, Dinar spends an exhausting 2-3 hours manually scouring various AI news channels on YouTube, collecting the latest videos, creating a new playlist for the day, and updating his playlist while deleting the previous day’s. It’s a tedious process prone to errors—often missing out on some recent videos or uploading outdated playlists that confuse his audience.
With an increasing number of AI news sources and the growing volume of daily videos, Dinar faces time pressure that detracts from other valuable work, like content creation and engagement with his community. The manual handling becomes overwhelming, inefficient, and costly due to lost audience attention and fluctuating video relevance.
This is precisely where this unique n8n automation workflow shines, transforming Dinar’s daily playlist management into a streamlined, automatic process synchronized with live YouTube data and his custom curated channel list.
2. What This Automation Does
Once set up and triggered every day at 7:15 AM, this n8n workflow:
- Reads a curated list of AI news YouTube channels from a Google Sheet to ensure updated channel metadata.
- Uses the YouTube API to fetch the latest 5 videos published within the last 24 hours for each channel, filtering out upcoming live streams.
- Deletes the previous day’s AI News playlist to avoid clutter and confusion.
- Creates a fresh YouTube playlist named with today’s date in YYMMDD format, clearly tagging it as an AI News playlist.
- Adds the newly fetched videos to this freshly created playlist automatically, ensuring up-to-date content collection.
- Saves the new playlist ID back into Google Sheets for tracking and workflow continuity.
- Optionally sends a Telegram message to notify Dinar that the playlist update is complete.
This workflow saves at least 2-3 hours daily and eliminates manual errors, giving Dinar peace of mind and freeing time to focus on content strategy.
3. Prerequisites ⚙️
- Google Sheets account with a sheet listing AI news YouTube channels including Channel User Name, Channel Name, Channel Link, and Channel ID.
- YouTube account with API access credentials configured in n8n to create and manage playlists.
- Telegram account and bot configured for optional notifications.
- n8n automation platform account to run and schedule the workflow.
- Valid YouTube Data API key with quota to fetch video data.
- Basic familiarity with n8n nodes like Google Sheets, YouTube, HTTP Request, Schedule Trigger, and Telegram.
4. Step-by-Step Guide
Step 1: Setup Your Google Sheet Channel List
Create a Google Sheet with columns: Channel User Name, Channel Name, Channel Link, and Channel ID starting from the first row. Populate with the “@” usernames of your favorite AI news YouTube channels.
Example: @CorporalStock
Make sure to share this sheet with your Google Sheets API OAuth credential email for access.
Step 2: Configure Google Sheets Read Node
In n8n, add a Google Sheets node named “Read Channel Names”. Configure it to read from your AI News Channels sheet (sheet ID matching your Google Sheet tab). This node pulls all the channel data necessary to fetch videos.
Verify it outputs JSON with channel information.
Step 3: Fetch Latest Videos via YouTube API
Add an HTTP Request node named “Get Videos” with the following settings:
- Method: GET
- URL: https://www.googleapis.com/youtube/v3/search
- Query Parameters:
- part=snippet
- publishedAfter={{ $now.minus(1, ‘day’) }}
- maxResults=5
- channel_id={{ $(‘Read Channel Names’).item.json[‘Channel Id’] }}
- order=date
- key=YOUR_YOUTUBE_API_KEY
This dynamically pulls videos published in the last 24 hours per channel.
Step 4: Split Out Videos into Individual Items
Add a Split Out node connected to “Get Videos” to process each video item separately.
Step 5: Filter Out Upcoming Live Streams
Insert a Filter node named “Filter Out Upcoming” with the condition that snippet.liveBroadcastContent is not equal to “upcoming”.
This avoids adding scheduled livestreams to your playlist.
Step 6: Create a New YouTube Playlist
Add a YouTube node named “Create Playlist” set to resource playlist and operation create. Use an expression for the title like {{ $today.format('yyLLdd') }} AI News for a uniquely dated playlist.
Authenticate with your YouTube account OAuth credentials.
Step 7: Save New Playlist ID to Google Sheets
Use a Google Sheets node labeled “Save Playlist ID” that writes the new playlist ID back to a tracking sheet under the “New Playlist ID” field for future reference.
Step 8: Delete Previous Day’s Playlist
Add another YouTube node “Delete Old Playlist” to remove the playlist created the day before using the saved playlist ID from Google Sheets.
Important: On the first run, disconnect this node to avoid errors because there is no previous playlist.
Step 9: Add Videos to the New Playlist
Connect the filtered videos through another YouTube node “YouTube” (playlistItem resource) configured to add each video ID to the newly created playlist from “Create Playlist” node.
Step 10: Notify Completion via Telegram (Optional)
Add a Telegram node named “Telegram” configured with your bot credentials to send a message like “Your AI News YT Playlist has been updated.” This keeps you informed of the workflow’s success.
Step 11: Setup Scheduled Trigger
Use a Schedule Trigger node set to run daily at 7:15 AM to automate the execution.
Step 12: Test the Workflow
Manually trigger the workflow using the Manual Trigger node and watch the runs to verify correct creation, deletion, and video additions.
5. Customizations ✏️
- Add More Channels: Update your Google Sheet with new channel user names, then run the separate “Create your Channel List” workflow to automatically fetch and update channel data before the main playlist workflow.
- Change Playlist Naming Convention: In the “Create Playlist” YouTube node, modify the title expression
{{ $today.format('yyLLdd') }} AI Newsto fit your branding or language. - Adjust Number of Videos: In the “Get Videos” HTTP Request node, change the
maxResultsparameter from 5 to any number suited to your content volume. - Disable Auto Playlist Deletion: Disconnect “Delete Old Playlist” node if you want to keep older playlists for archival purposes.
- Notification Channels: Replace or add messaging nodes such as Slack or Email for different notifications using similar config as the Telegram node.
>
6. Troubleshooting 🔧
Problem: “API key invalid or quota exceeded error” when fetching videos.
Cause: Your YouTube Data API key is incorrect or you’ve exhausted your API quota.
Solution: Check your API key in the “Get Videos” HTTP Request node and verify your quota in Google Cloud Console.
Problem: “Playlist deletion fails on first run.”
Cause: There is no previous day playlist ID saved yet.
Solution: Disconnect the “Delete Old Playlist” node the first time you run this workflow.
Problem: “Videos not added to playlist.”
Cause: The video IDs passed to the “YouTube” playlistItem node might be missing or incorrectly mapped.
Solution: Confirm the output of the “Filter Out Upcoming” node provides correct video IDs and that the “YouTube” node uses the expression {{$json.id.videoId}}.
7. Pre-Production Checklist ✅
- Verify your Google Sheets API credentials have proper read/write access.
- Confirm the YouTube OAuth2 credentials have permissions to create, delete playlists, and add videos.
- Test API connectivity manually with test queries in Postman or similar tools.
- Make sure the Google Sheet’s channel user names are correct and unique.
- Run the “Create your Channel List” workflow for initial channel metadata population.
- Test the workflow with the manual trigger before scheduling.
- Backup your Google Sheets data regularly to avoid accidental loss.
8. Deployment Guide
To deploy this workflow, activate scheduling at 7:15 AM daily with the Schedule Trigger node. Ensure the workflow is set to active in n8n, and monitor the first few runs to catch any issues early.
Enable workflow error notifications in n8n settings to get alerts if something breaks.
Consider self-hosting your n8n instance for more control and reliability. Hosting providers like Hostinger offer easy setup guides.
9. FAQs
- Q: Can I use Slack instead of Telegram for notifications?
A: Yes, simply add a Slack node in place of Telegram and configure your bot token. - Q: Will this workflow consume YouTube API quota significantly?
A: Since it only queries recent videos per channel once daily, the quota use is minimal, but monitor your quota in Google Cloud Console. - Q: Is my channel data secure?
A: All credentials are stored securely in n8n. However, be cautious sharing Google Sheets and API keys externally. - Q: Can I include more videos than 5 per channel?
A: Yes, just adjust themaxResultsparameter in the HTTP Request node. - Q: How do I add new channels to the playlist?
A: Update your Google Sheet with new channel user names, run the “Create your Channel List” workflow to update channel details, then run the main playlist workflow.
10. Conclusion
By following this comprehensive guide, you’ve automated the entire process of creating, updating, and managing a dynamic AI news YouTube playlist. What used to take several hours is now done automatically every day, enhancing your channel’s relevance and saving you valuable time.
You’ve learned how to integrate Google Sheets for dynamic channel management, use YouTube API for fetching videos and manipulating playlists, and optionally send Telegram notifications for workflow status monitoring.
Next steps? You can expand this automation by adding sentiment analysis on video descriptions, integrate AI summaries of news as playlist video titles, or cross-post playlist updates to social media automatically. Let’s keep innovating your content creation workflow!
Happy automating!