Back to Templates

Turn YouTube videos into weekly short clips with captions using WayinVideo and GPT-4o-mini

Created by

Created by: isaWOW || isawow
isaWOW

Last update

Last update 5 hours ago

Share


Description

Add your old YouTube video URLs to a Google Sheet once and every Monday at 9AM the workflow automatically processes each one end to end. WayinVideo runs two sequential APIs β€” first Summarization to extract structured highlights and tags, then AI Clipping to produce up to 3 viral short-form clips with 9:16 reframe, animated captions, and HD quality. GPT-4o-mini then writes platform-specific captions for TikTok, Facebook, and LinkedIn for each clip. Every clip is downloaded from WayinVideo and uploaded to Google Drive before the export link expires, all captions and Drive links are saved to a Content Calendar sheet, and the video row is marked Processed. Built for content creators, social media managers, and agencies who want to automatically repurpose their existing video library into short-form content every week without touching a single tool.


What This Workflow Does

  • Runs two WayinVideo APIs per video sequentially β€” First Summarization extracts structured highlights and tags, then AI Clipping produces up to 3 vertical clips with 9:16 reframe and animated captions
  • Writes three platform captions per clip β€” GPT-4o-mini produces a TikTok caption (max 150 characters), a Facebook post (100–200 words), and a LinkedIn post (150–250 words) for every clip
  • Downloads clips before export links expire β€” Each clip is downloaded from WayinVideo immediately and uploaded to Google Drive so you never lose access
  • Logs 16 fields per clip to the Content Calendar sheet β€” Video summary, clip title, score, timestamp, WayinVideo export link, Google Drive link, all three captions, hashtags, and status are all saved in one row
  • Marks each video as Processed automatically β€” After all clips are saved, the Video List row is updated with Processed status and today's date so it is never processed again
  • Runs two independent retry loops β€” One loop handles summarization polling, another handles clipping polling β€” each retrying every 30 seconds independently until SUCCEEDED
  • Processes all pending videos every Monday β€” Every video in the sheet with a pending status is picked up and run through the full pipeline in one automated weekly run

Setup Requirements

Tools Needed

  • n8n instance (self-hosted or cloud)
  • WayinVideo account with API access
  • OpenAI account with GPT-4o-mini API access
  • Google Sheets (two tabs: Video List and Content Calendar)
  • Google Drive (one folder for clips)

Credentials Required

  • WayinVideo API key (pasted into 3. WayinVideo β€” Submit Summarization, 5. WayinVideo β€” Get Summary Results, 9. WayinVideo β€” Submit AI Clipping, and 11. WayinVideo β€” Get Clip Results)
  • OpenAI API key
  • Google Sheets OAuth2 (used in 2. Google Sheets β€” Read Pending Videos, 20. Google Sheets β€” Save to Content Calendar, and 21. Google Sheets β€” Mark Video as Processed)
  • Google Drive OAuth2

⚠️ WayinVideo API key appears in 4 steps β€” replace YOUR_WAYINVIDEO_API_KEY in all four: 3. WayinVideo β€” Submit Summarization, 5. WayinVideo β€” Get Summary Results, 9. WayinVideo β€” Submit AI Clipping, and 11. WayinVideo β€” Get Clip Results. Missing any one will cause the workflow to fail.

⚠️ Two separate Google Sheet IDs are used β€” replace YOUR_VIDEO_LIST_SHEET_ID in 2. Google Sheets β€” Read Pending Videos and 21. Google Sheets β€” Mark Video as Processed, and replace YOUR_CONTENT_CALENDAR_SHEET_ID in 20. Google Sheets β€” Save to Content Calendar.

Estimated Setup Time: 25–30 minutes


Step-by-Step Setup

  1. Import the workflow β€” Open n8n β†’ Workflows β†’ Import from JSON β†’ paste the workflow JSON β†’ click Import

  2. Get your WayinVideo API key β€” Log in to your WayinVideo account β†’ go to Account Settings β†’ copy your API key

  3. Add your WayinVideo API key to node 3 β€” Open node 3. WayinVideo β€” Submit Summarization β†’ find the Authorization header value Bearer YOUR_WAYINVIDEO_API_KEY β†’ replace the placeholder with your actual key

  4. Add your WayinVideo API key to node 5 β€” Open node 5. WayinVideo β€” Get Summary Results β†’ find the same Authorization header β†’ replace the placeholder with the same key

  5. Add your WayinVideo API key to node 9 β€” Open node 9. WayinVideo β€” Submit AI Clipping β†’ find the Authorization header β†’ replace the placeholder

  6. Add your WayinVideo API key to node 11 β€” Open node 11. WayinVideo β€” Get Clip Results β†’ find the same Authorization header β†’ replace the placeholder

  7. Connect OpenAI β€” Open node 16. OpenAI β€” GPT-4o-mini Model β†’ click the credential dropdown β†’ add your OpenAI API key β†’ test the connection

  8. Create your Video List sheet β€” Open your Google Sheet β†’ add a tab named exactly Video List β†’ add these 5 column headers in row 1: Video URL, Video Title, Niche / Category, Status, Last Processed Date β†’ add your first video URLs in the rows below, leaving Status blank

  9. Create your Content Calendar sheet β€” In the same spreadsheet or a separate one β†’ add a tab named exactly Content Calendar β†’ add these 16 column headers: Video URL, Video Title, Niche, Video Summary, Clip Number, Clip Title, Clip Score, Clip Timestamp, WayinVideo Export Link, Google Drive Link, TikTok Caption, Facebook Caption, LinkedIn Caption, Hashtags, Processed On, Status

  10. Get your Video List Sheet ID β€” Open the Google Sheet containing the Video List tab in a browser β†’ copy the string between /d/ and /edit in the URL

  11. Connect Google Sheets for reading and marking β€” Open node 2. Google Sheets β€” Read Pending Videos β†’ click the document field β†’ replace YOUR_VIDEO_LIST_SHEET_ID with your actual Sheet ID β†’ connect Google Sheets OAuth2 β†’ repeat the same Sheet ID replacement in node 21. Google Sheets β€” Mark Video as Processed

  12. Get your Content Calendar Sheet ID β€” If it is a separate spreadsheet, open it and copy the Sheet ID from the URL; if it is the same spreadsheet, use the same Sheet ID

  13. Connect Google Sheets for content calendar β€” Open node 20. Google Sheets β€” Save to Content Calendar β†’ replace YOUR_CONTENT_CALENDAR_SHEET_ID with the correct Sheet ID β†’ confirm Google Sheets OAuth2 is connected

  14. Get your Google Drive folder ID β€” Open your target Google Drive folder in a browser β†’ the folder ID is the string at the end of the URL after /folders/

  15. Connect Google Drive β€” Open node 19. Google Drive β€” Upload Clip β†’ click the credential dropdown β†’ add Google Drive OAuth2 β†’ authorize access β†’ replace YOUR_GOOGLE_DRIVE_FOLDER_ID in the folder field with your actual folder ID

  16. Activate the workflow β€” Toggle the workflow to Active β€” it will run automatically every Monday at 9AM. To test immediately, click on node 1. Schedule β€” Every Monday 9AM and use the manual Execute option.


How It Works (Step by Step)

Step 1 β€” Schedule: Every Monday 9AM
The workflow fires automatically every Monday at 9AM using the cron expression 0 9 * * 1. No manual trigger is needed once the workflow is active.

Step 2 β€” Google Sheets: Read Pending Videos
All rows from your Video List tab are read. Each row contains a video URL, title, and niche. Every unprocessed video is picked up and run through the full pipeline.

Step 3 β€” HTTP: WayinVideo β€” Submit Summarization
The video URL is sent to WayinVideo's Summarization API. WayinVideo processes the video and returns a task ID confirming the summarization job has started.

Step 4 β€” Wait: 90 Seconds Summary
The workflow pauses 90 seconds before checking the summarization status, giving WayinVideo time to process the video.

Step 5 β€” HTTP: WayinVideo β€” Get Summary Results
A GET request checks the summarization results endpoint using the task ID. It returns the current status and, once complete, the summary text, highlights array, and tags array.

Step 6 β€” IF: Summary Complete?
This is the first polling gate. If the status equals SUCCEEDED (YES path), the summary is ready and the workflow moves forward to extract the data. If still processing (NO path), the workflow routes to 7. Wait β€” 30 Seconds Summary Retry which pauses 30 seconds then loops back to step 5. This repeats until SUCCEEDED.

Step 7 β€” Wait: 30 Seconds Summary Retry
When the summary is not yet ready, the workflow waits 30 seconds then returns to step 5 for another check.

Step 8 β€” Code: Store Summary Data
The completed summary data is extracted: the summary text, highlights joined as a pipe-separated string, and tags as a comma-separated string. The video URL, title, and niche from the sheet row are also packaged here. All five fields are carried forward to both the caption writing and the content calendar log.

Step 9 β€” HTTP: WayinVideo β€” Submit AI Clipping
The same video URL is submitted to WayinVideo's AI Clipping API. The request specifies: clips between 30 and 60 seconds, up to 3 clips, HD 720 resolution, animated captions in the original language using caption template temp-7, AI reframe to 9:16 vertical format, and export enabled so download links are generated. WayinVideo returns a task ID for the clipping job.

Step 10 β€” Wait: 90 Seconds Clips
The workflow pauses another 90 seconds before checking the clipping status. AI clipping takes longer than summarization because video editing is involved.

Step 11 β€” HTTP: WayinVideo β€” Get Clip Results
A GET request checks the clipping results endpoint using the clipping task ID. It returns the current status and, once complete, the clips array with title, description, score, timestamps, and export download link for each clip.

Step 12 β€” IF: Clips Complete?
This is the second polling gate. If the status equals SUCCEEDED (YES path), the clips are ready. If still processing (NO path), the workflow routes to 13. Wait β€” 30 Seconds Clips Retry which pauses 30 seconds then loops back to step 11. This second loop runs independently from the summarization loop.

Step 13 β€” Wait: 30 Seconds Clips Retry
When clips are not yet ready, the workflow waits 30 seconds then returns to step 11 for another check.

Step 14 β€” Code: Extract Clips Array
The clips array is split into individual rows β€” one per clip. Millisecond timestamps are converted to MM:SS format. All summary data from step 8 is merged into each clip row so every downstream step has the full video context alongside the clip-specific data.

Step 15 β€” AI Agent: Write Platform Captions
GPT-4o-mini receives the clip description, title, viral score, clip tags, the full video summary, highlights, tags, video title, and niche. It writes four labeled sections: a TikTok caption under 150 characters with a scroll-stopping hook, a Facebook caption of 100–200 words with storytelling and a CTA, a LinkedIn caption of 150–250 words framed as a thought leadership post, and 5–8 universal hashtags for use across all platforms.

Step 16 β€” OpenAI: GPT-4o-mini Model
This is the language model powering the caption writing. It runs with default settings for natural, platform-matched output.

Step 17 β€” Code: Parse Caption Output
All four labeled sections (TIKTOK_CAPTION, FACEBOOK_CAPTION, LINKEDIN_CAPTION, HASHTAGS) are extracted from the AI output using regex. All clip metadata and caption text are packaged for the download and logging steps.

Step 18 β€” HTTP: Download Clip File
The WayinVideo export link for this clip is fetched and the .mp4 file is downloaded as a binary file. This step happens immediately so the export link does not expire before the file is saved.

Step 19 β€” Google Drive: Upload Clip
The downloaded clip is uploaded to your specified Google Drive folder. The filename is auto-generated as Video Title β€” Clip N β€” Clip Title.mp4. Google Drive returns the file's web view link which is passed to the sheet log.

Step 20 β€” Google Sheets: Save to Content Calendar
One row is appended to your Content Calendar tab with all 16 columns: video URL, video title, niche, video summary, clip number, clip title, viral score, timestamp range, WayinVideo export link, Google Drive web view link, TikTok caption, Facebook caption, LinkedIn caption, hashtags, processed timestamp, and Status set to Ready to Post.

Step 21 β€” Google Sheets: Mark Video as Processed
The Video List row matching this video URL is updated with Status set to Processed and the current date in the Last Processed Date column. This prevents the same video from being picked up in future Monday runs.


Key Features

βœ… Two WayinVideo APIs per video β€” Summarization then Clipping β€” The workflow runs both APIs sequentially per video, using the summary data to enrich captions and the clipping API to produce ready-to-post vertical clips
βœ… Two independent retry loops β€” Summarization and clipping each have their own 30-second polling loop β€” one never blocks the other
βœ… 9:16 vertical reframe built in β€” Every clip is automatically reframed to 9:16 aspect ratio with animated captions in the same WayinVideo request β€” no manual editing needed
βœ… Clips downloaded before links expire β€” WayinVideo export links have a limited lifespan β€” the workflow downloads and uploads to Drive immediately after clipping completes
βœ… Three platform captions per clip in one GPT call β€” TikTok, Facebook, and LinkedIn are all written in one request with platform-specific rules enforced in the prompt
βœ… Structured Drive filename per clip β€” Files are named as Video Title β€” Clip N β€” Clip Title.mp4 so your Drive folder is organized and scannable without opening files
βœ… Status tracking prevents double-processing β€” Videos marked Processed in the Video List are skipped on all future Monday runs β€” add new videos any time and they will be picked up automatically
βœ… Runs fully unattended every Monday β€” Once activated, you only need to add video URLs to the sheet β€” the entire pipeline runs without any manual intervention


Customisation Options

Change the weekly run day or time β€” In node 1. Schedule β€” Every Monday 9AM, edit the cron expression from 0 9 * * 1 to run on a different day β€” for example 0 9 * * 3 for Wednesday at 9AM or 0 7 * * 1 for Monday at 7AM.

Increase the number of clips per video β€” In node 9. WayinVideo β€” Submit AI Clipping, change "limit": 3 to a higher number such as 5 to generate more clips per video β€” useful for longer videos with more shareable moments.

Change the clip duration range β€” In node 9. WayinVideo β€” Submit AI Clipping, change "target_duration": "DURATION_30_60" to "DURATION_15_30" for shorter TikTok-style clips or "DURATION_60_90" for slightly longer content.

Add a Slack notification when a video is fully processed β€” After node 21. Google Sheets β€” Mark Video as Processed, add a Slack step that posts the video title and the number of clips generated to a #content-team channel so your team knows new clips are ready in Drive without checking the sheet.

Send a weekly digest email β€” After node 21. Google Sheets β€” Mark Video as Processed (on the last video processed each Monday run), add a Gmail step that lists all videos processed that week, how many clips were generated, and a link to the Content Calendar sheet.


Troubleshooting

Workflow not triggering on Monday:

  • Confirm the workflow is Active β€” inactive workflows do not run on a schedule
  • Check that your n8n instance is running at 9AM Monday β€” self-hosted instances that are off will not fire scheduled workflows
  • To test immediately, click on node 1. Schedule β€” Every Monday 9AM and use the manual Execute option β€” do not wait for the scheduled run to verify setup

WayinVideo API key errors:

  • Confirm YOUR_WAYINVIDEO_API_KEY is replaced in all four steps: 3. WayinVideo β€” Submit Summarization, 5. WayinVideo β€” Get Summary Results, 9. WayinVideo β€” Submit AI Clipping, and 11. WayinVideo β€” Get Clip Results β€” missing any one causes that step to fail with a 401 error
  • Check execution logs for the specific node that failed β€” the raw API error will show which step the key is missing from

Either polling loop stuck and not completing:

  • Check that the video URL in your Video List sheet is publicly accessible β€” private YouTube videos, unlisted videos with login walls, or expired links will not be processed by WayinVideo
  • Open the execution log of node 5 or 11 for the raw response β€” WayinVideo may have returned FAILED with a specific error message
  • The summarization and clipping loops are independent β€” if summarization gets stuck, clipping never starts. Fix the URL and resubmit.

Google Drive upload failing:

  • Confirm the Google Drive OAuth2 credential in node 19. Google Drive β€” Upload Clip is connected and not expired β€” re-authorize if needed
  • Confirm YOUR_GOOGLE_DRIVE_FOLDER_ID is replaced with just the folder ID from the URL β€” not the full Drive URL
  • If the clip download in step 18 returned an empty or failed file, the upload in step 19 will also fail β€” check step 18's execution log for the HTTP status of the WayinVideo export link

Content Calendar not logging or Video List not updating:

  • Confirm YOUR_CONTENT_CALENDAR_SHEET_ID in node 20 and YOUR_VIDEO_LIST_SHEET_ID in nodes 2 and 21 are all replaced with the correct Sheet IDs
  • Confirm the tab names match exactly: Content Calendar and Video List β€” including capitalization and spacing
  • Check that the Google Sheets OAuth2 credential is connected in all three sheet steps β€” it is easy to connect it in node 2 but forget to connect it in nodes 20 and 21

Support

Need help setting this up or want a custom version built for your team or agency?

πŸ“§ Email:[email protected]
🌐 Website:https://isawow.com