π¬ Generate YouTube shorts using WayinVideo AI and upload clips to Google Drive
β‘ 852 views Β· π¬ Content Creation & Video
π‘ Pro Tip β Since TikTok doesnβt have a public API, getting data usually means fragile HTTP scraping. ScraperNode is a community node that gives you clean JSON for TikTok profiles, videos, and comments β drop it into your workflow and skip the parsing.
Description
Description
Paste any video URL in chat β YouTube, podcast, webinar, anything β and this n8n workflow automatically finds the best short clips using WayinVideo AI, adds captions, reframes to 9:16 vertical format, and uploads everything directly to your Google Drive. No editing software, no manual work. Just paste and done.
Built for content creators, marketers, and agencies who want to repurpose long-form video into viral short clips on autopilot.
What This Workflow Does
This automation handles your complete video-to-clips pipeline:
- Chat-triggered β User pastes any video URL and the workflow starts instantly
- AI clip detection β WayinVideo AI finds the most engaging moments automatically
- Auto-captions β Adds styled captions to every clip without manual effort
- Smart reframing β Converts horizontal video to 9:16 vertical (perfect for Reels, Shorts, TikTok)
- Smart polling loop β Waits and retries every 30 seconds until processing is complete
- Batch download β Downloads all generated clips automatically
- Google Drive upload β Saves every clip with its title directly to your chosen folder
Setup Requirements
Tools Youβll Need:
- Active n8n instance (self-hosted or n8n Cloud)
- WayinVideo account with API access
- Google Drive with OAuth2 access
Estimated Setup Time: 10β15 minutes
Step-by-Step Setup
1. Get Your WayinVideo API Key
WayinVideo is the AI engine that generates short clips from your videos.
- Go to WayinVideo and create a free/paid account
- Navigate to Dashboard β API section
- Copy your Bearer API token
- Open the βπ¬ Submit Video to WayinVideo APIβ node in n8n
- Replace
YOUR_WAYINVIDEO_API_KEYwith your actual token (in the Authorization header) - Do the same in the βπ Poll for Clip Resultsβ node β replace the same placeholder there too
> β οΈ The API key appears in two places β Submit node and Poll node. Replace both!
2. Connect Google Drive
- In n8n: Go to Credentials β Add Credential β Google Drive OAuth2 API
- Complete the Google OAuth authentication
- Open the ββοΈ Upload Clip to Google Driveβ node
- Select your Google Drive credential
- Replace
YOUR_GOOGLE_DRIVE_FOLDER_IDwith your actual folder ID
How to find your Google Drive Folder ID:
- Open Google Drive in browser
- Navigate to your target folder
- Look at the URL:
drive.google.com/drive/folders/THIS_IS_YOUR_FOLDER_ID - Copy just that last part and paste it in the node
3. Configure the Chat Trigger
This workflow is triggered when a user sends a video URL in the n8n chat interface.
- The trigger node receives
$json.chatInputβ this is the video URL the user pastes - Make sure your n8n instance has the chat trigger enabled
- No additional setup needed β it works out of the box
4. Customise Clip Settings (Optional)
Open the βπ¬ Submit Video to WayinVideo APIβ node to customise:
| Parameter | Default Value | What It Does |
|---|---|---|
target_duration | DURATION_30_60 | Clip length (30β60 seconds) |
limit | 3 | Number of clips to generate |
resolution | HD_720 | Video quality (720p) |
ratio | RATIO_9_16 | Vertical format (for Reels/Shorts) |
enable_caption | true | Auto-captions on/off |
caption_display | original | Caption language/style |
cc_style_tpl | temp-7 | Caption design template |
enable_ai_reframe | true | Auto-reframe to vertical |
To change clip length options:
DURATION_15_30β 15 to 30 second clipsDURATION_30_60β 30 to 60 second clips (default)DURATION_60_90β 60 to 90 second clips
To change ratio:
RATIO_9_16β Vertical (TikTok, Reels, Shorts)RATIO_16_9β Horizontal (YouTube, LinkedIn)RATIO_1_1β Square (Instagram feed)
To change resolution:
HD_720β 720p (faster processing)FULL_HD_1080β 1080p (higher quality)
5. Test & Activate
- Open n8n and go to this workflow
- Click βChatβ button to open the chat interface
- Paste any YouTube video URL and press send
- Watch the workflow run step by step in the execution view
- Check your Google Drive folder β clips should appear within 1β5 minutes
- Once confirmed, toggle the workflow Active at the top β
How It Works (Step by Step)
Step 1 β Chat Trigger
User pastes a video URL in the n8n chat. The URL is captured as $json.chatInput and passed to the next node.
Step 2 β Submit Video to WayinVideo API
The workflow sends a POST request to the WayinVideo API (/api/v2/clips) with:
- The video URL
- All your clip preferences (duration, ratio, captions, resolution)
- A project name auto-generated with todayβs date (e.g.,
Podcast Clips - 2025-01-15)
The API returns a Job ID which is used to track processing status.
Step 3 β Wait 30 Seconds
The workflow pauses for 30 seconds to give WayinVideo time to start processing. This avoids hitting the API too early with an empty response.
Step 4 β Poll for Clip Results
Using the Job ID from Step 2, the workflow calls:
GET /api/v2/clips/results/{job_id}
to check if clips are ready.
Step 5 β Clips Ready? (Smart Loop)
The IF node checks if the clips array in the response is non-empty:
- YES (clips ready) β Moves forward to extract clip details
- NO (still processing) β Loops back to βWait 30 Secondsβ and tries again
> This smart retry loop runs automatically every 30 seconds until your clips are done. No manual retries needed.
Step 6 β Extract Clip Details
The Code node loops through all generated clips and extracts:
titleβ AI-generated clip titleexport_linkβ Direct download URL for the clipscoreβ AI virality/engagement scoretagsβ Topic tags for the clipdescβ Short clip descriptionbegin_ms/end_msβ Timestamp of the clip in the original video
Each clip becomes a separate item for parallel processing.
Step 7 β Download Clip File
For each clip, the workflow downloads the video file from the export_link URL. The file is stored as binary data (responseFormat: file) ready for upload.
Step 8 β Upload to Google Drive
Each downloaded clip is uploaded to your specified Google Drive folder. The file is named using the clipβs AI-generated title automatically.
Key Features
β
Zero manual editing β AI handles clip selection, captions, and reframing
β
Smart polling loop β Auto-retries every 30s, no timeout issues
β
Batch processing β Handles multiple clips from one video in one run
β
AI virality scoring β Each clip comes with an engagement score
β
Auto-named files β Clips saved with meaningful AI-generated titles
β
Flexible formats β Supports 9:16, 16:9, and 1:1 ratios
β
Caption support β Multiple caption style templates available
β
Google Drive ready β Organised storage with zero manual uploads
Customisation Options
Generate more clips per video:
Change limit from 3 to 5 or 10 in the Submit node.
Sort clips by score before uploading:
Add a Sort node after βExtract Clip Detailsβ and sort by score descending β this ensures your best clips are uploaded first.
Save clip metadata to Google Sheets: Add a Google Sheets node after βExtract Clip Detailsβ to log the title, score, tags, and timestamp of each clip for tracking.
Add a response message back to chat:
Add a βRespond to Webhookβ node at the end to send a confirmation message like: "β
3 clips have been uploaded to your Google Drive!"
Process multiple videos in batch: Modify the chat trigger to accept comma-separated URLs and add a Split node to process each video sequentially.
Troubleshooting
Clips not generating / API returns empty:
- Verify your WayinVideo API key is correct in both the Submit and Poll nodes
- Check your WayinVideo account has active credits
- Ensure the video URL is publicly accessible (private YouTube videos wonβt work)
- Try with a shorter video first (under 20 minutes)
Workflow stuck in polling loop:
- Very long videos (1+ hour) can take 5β10 minutes to process β this is normal
- Check WayinVideo dashboard to see if your job is still running
- If stuck for more than 15 minutes, check API status at wayinvideo.com
Google Drive upload failing:
- Re-authenticate your Google Drive OAuth credential
- Verify the Folder ID is correct (copy directly from the URL)
- Check that your Google account has write access to that folder
- Ensure the folder is not inside a Shared Drive (use My Drive for simplest setup)
Video URL not accepted:
- Make sure you paste only the URL with no extra text
- YouTube Shorts URLs work β use full URL format:
https://www.youtube.com/watch?v=... - Some region-locked videos may not be accessible
Clips uploading with wrong names:
- The file name comes from
clip.titlein the Extract node - If titles look odd, you can add a Code node to clean/rename them before upload
Support
Need help setting this up or want a custom version for your use case?
π§ Email: info@isawow.com
π Website: https://isawow.com
π Nodes Used
HTTP Request, Google Drive
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File