Use this powerful n8n workflow to automate scheduled YouTube video uploads (12-hour intervals) directly from your self-hosted environment. Ideal for consistent content publishing.
Download this n8n workflow template and start using it instantly.
Managing a large backlog of video content and ensuring consistent publication times can be time-consuming. This specialized n8n workflow template solves the problem of manual scheduling by automating the entire process, from file discovery to playlist inclusion.
This robust n8n workflow leverages custom JavaScript logic to precisely calculate future upload times, ensuring each video is scheduled exactly 12 hours after the previous one, anchored to a specific timezone (JST, +09:00). This provides unparalleled consistency for your publishing strategy. Once configured, the process requires only a single manual execution via the n8n trigger to initiate the entire upload queue.
This automated publishing solution begins with the Manual Trigger n8n node, which kicks off the process.
List Video Files n8n node executes a system command (find) to locate all .mp4 video files within the specified local directory (/opt/downloads/单词卡/A1-A2).Code n8n node (Sort and Generate Items) processes the file paths. It extracts a numeric day identifier from the filenames, sorts the videos sequentially based on this number, and generates individual items for the n8n workflow.Calculate Publish Schedule Code n8n node. This custom script determines the next available publishing slot, adds a 30-minute buffer, and then applies the sequential 12-hour interval offset for every subsequent video. It handles timezone conversion (JST to UTC) to generate the correct publishAtUtc timestamp required by YouTube.Split in Batches n8n node ensures that each video is handled individually, improving memory management and workflow reliability, especially for large files.Read Video File n8n node accesses the local file system and retrieves the actual binary data for the video file.Upload to YouTube (Scheduled) n8n node performs the API call to YouTube, using the file data and the calculated publishAtUtc from the previous step. The video is initially uploaded as a private resource.Add to Playlist n8n node uses the returned uploadId to automatically organize the new video into the specified YouTube playlist. This completes the fully automated n8n workflow cycle.To use this n8n template successfully, follow these steps:
Upload to YouTube and Add to Playlist n8n nodes. You must configure a YouTube OAuth2 API credential with the necessary scopes (Upload and Playlist management).List Video Files n8n node (Execute Command) and update the find command path to match the directory where your video files are stored on the server hosting n8n.Calculate Publish Schedule n8n node's Code section.Upload to YouTube n8n node parameters (Title, Description, Tags, Category ID) to match your content strategy. Also, update the Playlist ID in the Add to Playlist n8n node.Manual Trigger to begin the scheduled upload sequence.This n8n workflow utilizes several specialized n8n nodes:
Manual Trigger: The starting n8n trigger point for initiating the upload sequence on demand.
List Video Files (Execute Command): Uses find command to dynamically locate all target .mp4 files on the local filesystem. Essential for the initial data collection of this n8n template.
Sort and Generate Items (Code): A custom n8n node script that sorts videos based on extracted 'day' numbers from their filenames, ensuring the correct upload order.
Calculate Publish Schedule (+12h Interval) (Code): The core logic n8n node. It calculates the precise future publishAtUtc timestamps for each video, enforcing a 12-hour release interval tailored to the JST (+09:00) timezone.
Split in Batches (Split In Batches): A flow control n8n node that ensures the remaining workflow steps process one video item fully before proceeding to the next, preventing simultaneous resource conflicts during the upload process.
Read Video File (Read/Write File): Reads the binary data of the video file from the path specified in the previous n8n node output, preparing it for the YouTube API.
Upload to YouTube (YouTube n8n node): The primary YouTube n8n node used for uploading the video file. It is configured to use the dynamically calculated publishAt timestamp and sets the video privacy status to private until the scheduled time.
Add to Playlist (YouTube n8n node): Uses the YouTube n8n node again to associate the newly uploaded video (via its uploadId) with a predefined channel playlist, maintaining content organization.
Automate YouTube uploads! This powerful n8n workflow uses AI (OpenAI/Gemini) to generate high-quality, SEO-optimized tags and descriptions from video transcripts, and automatically schedules videos for consistent future publication dates.

Use this powerful n8n workflow to monitor your YouTube subscriptions hourly via an n8n trigger and RSS feeds, filtering for new, full-length videos and sending rich HTML email notifications directly to you. Start building with n8n templates today.

Use this comprehensive n8n workflow to fully automate YouTube Shorts creation—from AI ideation and scriptwriting (OpenAI) to video rendering, quality approval via Telegram, and publishing using the YouTube n8n node.

Use this powerful n8n workflow to automatically transcribe YouTube videos via Gemini AI and convert the output into structured, SEO-ready blog posts, complete with category and HTML formatting.









































