Auto-Generate YouTube SEO Metadata and Thumbnails from Google Drive Videos with n8n
Google Drive video upload → LemonFox transcription → Gemini analysis for title/description/tags/thumbnail → auto-upload to YouTube → permission cleanup
- Who
- Content creators or ops teams who want to automate YouTube publishing and SEO packaging from raw videos
- You get
- After a video lands in Drive, the workflow transcribes, generates SEO metadata and a thumbnail, then publishes to YouTube
- You need
- n8n · google-drive · lemonfox
Constraints
Prerequisites: an accessible n8n instance; Google Drive OAuth credentials with access to the target folder; a LemonFox API key; Google Gemini API credentials; YouTube/upload-post.com API credentials. Import the template into n8n, then fill in credentials and folder IDs per node instructions. Place the video file in the designated Drive folder in advance, and store sponsor info as videotitle_sponsors.txt in the same folder if needed.
What they did
Author iamvaar published an end-to-end n8n template: when a new video file appears in a designated Google Drive folder, the workflow automatically triggers transcription, AI content analysis, thumbnail generation, and uploads to YouTube via upload-post.com, then cleans up the temporary public permission on the Drive file. The template contains 22 nodes organized into four stages: trigger and access, transcription and data prep, AI strategy and creative, and publishing and cleanup.
How it went
No specific runtime metrics or effect data (e.g., CTR improvement, time saved) were reported by the source. The template is listed as published on n8n with 84 views as of the fetch date.
Worth knowing
1. This site has not imported or run the workflow (reproduction=not_tested); node compatibility with current n8n versions is not guaranteed. 2. The upload node relies on the third-party service upload-post.com, not the official YouTube Data API; separate registration and API key are required, and the template uses an Apikey prefix in the Authorization header. 3. The sponsor file must be named exactly videotitle_sponsors.txt in the same folder as the video; otherwise Search Drive Files returns empty. 4. Grant Temp File Access temporarily makes the file anyoneWithLink, creating a brief public window; evaluate carefully for sensitive content. 5. The text analysis model in the snapshot is gemini-3.1-flash-lite-preview and the image generation model is gemini-2.5-flash-image (Nano Banana); available models may change as Gemini updates. 6. If LemonFox transcription fails or returns an unexpected format, the regex in Clean SRT Content may need adjustment.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Replace __UKH_BEARER_20__ with your real secret/token (path /nodes/20/parameters/headerParameters/parameters/0/value; literal auth header).
Configuration to replace
- Source template is n8n public workflow #14255 (~22 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use. 1 literal secret value(s) replaced with __UKH_…__ placeholders.
Template retrieved: 2026-10-24
Steps
Configure trigger and temporary access
After importing the template, configure the Google Drive Trigger node: set event=fileCreated, triggerOn=specificFolder, and enter the folderToWatch to monitor (e.g., a transcript folder). Next, configure the If Video Mime Type node with the condition mimeType contains video so only video files proceed. Then configure Grant Temp File Access using Google Drive OAuth2 credentials to add an anyoneWithLink reader permission so external services can download the video.
Transcribe video and clean subtitles
Configure the Post Audio to Lemonfox node: method POST, URL https://api.lemonfox.ai/v1/audio/transcriptions, authentication HTTP Bearer Auth with your LemonFox API key; body parameters include file pointing to the Drive download link (already referencing the upstream node ID), language=english, and response_format=srt. After running, the Clean SRT Content code node automatically removes escaped quotes and newlines and trims extra blank lines. Then the Create Text File in Drive node writes the cleaned .srt back to Drive for archiving.
Execution prompt · Source text。JS Code field of the Clean SRT Content node
// Get raw string let raw = $json.data; // Step 1: Remove wrapping quotes if present if (raw.startsWith('"') && raw.endsWith('"')) { raw = raw.slice(1, -1); } // Step 2: Unescape characters raw = raw .replace(/\\"/g, '"') // \" → " .replace(/\\n/g, '\n'); // \n → actual newline // Step 3: Clean extra blank lines (optional but nice) raw = raw.replace(/\n{3,}/g, '\n\n').trim(); // Return as clean SRT return [ { json: { srt: raw } } ];Extract sponsor information
The Search Drive Files node automatically queries for a file named after the video filename (without extension) plus _sponsors.txt in the same directory. If found, Fetch File Details downloads it via the Google Drive API, and Extract Content from File converts it to text for the downstream AI node. If you do not need sponsor handling, you can skip or leave this branch empty, but the template retains this query by default.
Analyze content with AI and generate thumbnail
The Content Analysis Agent node receives the transcript and sponsor info, then calls the Gemini Chat Model (gemini-3.1-flash-lite-preview) for analysis. It is connected to Parse Structured Output to enforce strict JSON output. Then the Generate Thumbnail Image node uses gemini-2.5-flash-image (Nano Banana) to create a 16:9 thumbnail based on the AI-generated thumbnail_prompt.
Execution prompt · Source text。Text / System Prompt field of the Content Analysis Agent node
=**You are an expert YouTube Content Strategist and SEO Specialist. Your task is to transform the provided video transcript into a fully optimized YouTube metadata package (Title, Description, Tags, and Hashtags) designed for high CTR and search discoverability.** --- **Video Transcript:** `{{ $('Post Audio to Lemonfox').item.json.data }}` --- ### **Instructions:** 1. **Analyze the Transcript:** Identify the "Big Idea," key takeaways, and the most clickable moment to form the basis of the title and hook. 2. **Video Title:** Create a compelling, high-CTR title (under 70 characters). Balance SEO keywords with psychological triggers (curiosity, urgency, or transformation). 3. **Video Description:** * **The Hook:** A strong opening sentence that summarizes the value. * **The Summary:** A concise, engaging breakdown of what the viewer will learn (150–300 words). * **Formatting:** Use clean spacing and bullet points for readability. * **Call to Action:** Include a prompt for viewers to subscribe or comment on a specific topic from the video. 4. **Tags & Hashtags:** * Generate 15–20 relevant SEO tags (comma-separated). * Generate 3–5 high-reach hashtags. 5. **Thumbnail Prompt:** Create a detailed AI image prompt for a 16:9 YouTube thumbnail. Focus on high contrast, "face-to-camera" emotion (if applicable), and bold text overlay suggestions. --- **Sponsors:** `{{ $json.data }}` ### **Sponsor Handling:** * Check the "Sponsors" input. * **If sponsors exist:** * Include a "Sponsored By" section at the top of the `video_description`. * Extract and list their **name** and **email**. * **If no sponsors exist:** Return an empty array for the sponsors key. * And this sponsors had nothingh to do with the description or title so just extract the sponsor seperately. --- ### **Output Format:** Return **strictly** a valid JSON object with the following structure: ```json { "video_title": "Your optimized YouTube title here", "video_description": "Your full SEO description including sponsor mentions...", "tags": "tag1, tag2, tag3, tag4...", "hashtags": "#hashtag1 #hashtag2 #hashtag3", "thumbnail_prompt": "Detailed 16:9 AI image generation prompt here...", "sponsors": [ { "sponsor_name": "Sponsor Name", "sponsor_email": "[email protected]" } ] } ```Upload to YouTube and clean up permissions
[First-test safety] Before the first test, temporarily disconnect the Upload to YouTube API node or point it at a mock endpoint; validate metadata and thumbnails with a test video/account before enabling real uploads. The Upload to YouTube API node sends a multipart/form-data POST to https://api.upload-post.com/api/upload, including the video download link, AI-generated title and description, platform identifier youtube, and the thumbnail binary data from the previous step. You must replace the placeholder enter-your-api-key in the Authorization header with your upload-post.com API key, and replace enter-your-username in the body with your actual username. After upload completes, the Delete Original File permissions in Drive node immediately removes the anyoneWithLink permission to restore privacy.
Prompt you can copy
Setup guidance · Editorial suggestion。Give to a setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
You are an n8n workflow setup assistant. The user wants to replicate the template that auto-generates YouTube SEO metadata and thumbnails from Google Drive videos. First confirm the user has: 1) an n8n instance; 2) Google Drive OAuth credentials with folder access; 3) a LemonFox API key; 4) Google Gemini API credentials; 5) upload-post.com API credentials. Then guide them to configure the Trigger, transcription node, AI Agent prompt (style adjustable), thumbnail generation model, and upload credentials. Remind them to replace placeholders like folderToWatch, API keys, and username, and suggest testing with a short video before production use.
To adjust generation style, edit the SEO strategy and thumbnail_prompt requirements in the Content Analysis Agent. To change the upload target, replace the URL and parameters in the Upload to YouTube API node.
Source
Create YouTube SEO metadata and thumbnails from Google Drive videos with Gemini, LemonFox and upload-post · iamvaar · n8n.io · 2026-03-23
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.