Automate YouTube Content Analysis with n8n & Google Gemini AI

This n8n workflow automates extracting detailed summaries, transcripts, and audience metadata from YouTube videos using Google’s Gemini AI. It saves hours of manual content analysis and generates actionable insights tailored for various professional needs.
formTrigger
httpRequest
googleDrive
+7
Workflow Identifier: 1292
NODES in Use: formTrigger, Set, Code, HTTP Request, Merge, Markdown, Google Drive, Gmail, Form, Sticky Note
Automate YouTube analysis with n8n and Google AI

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow uses n8n and Google Gemini AI to get information from any YouTube video fast. It solves the problem of spending many hours manually watching videos and taking notes. The result is a quick report with summaries, transcripts, or social clip suggestions sent by email and saved to Google Drive.

It pulls video data, reads the audience type, and writes detailed text outputs. This makes video analysis easier and faster without losing quality.


Who should use this workflow

Marketers, content creators, and teams who watch YouTube videos to get key points and highlights. They want to save time and avoid mistakes from manual note-taking.

People needing fast, readable summaries or transcripts from videos will find this useful.


Tools and services used

  • n8n automation tool: Runs the workflow steps.
  • Google YouTube Data API: Fetches video metadata like title and stats.
  • Google Generative Language API (Google Gemini AI): Creates audience details and text summaries.
  • Google Drive: Stores the text output files.
  • Gmail API: Sends email with the analysis result.


Beginner step-by-step: How to build this in n8n

Step 1: Import the workflow

  1. Download the workflow file using the Download button on this page.
  2. In n8n editor, use the Import from File option to add the workflow.

Step 2: Configure credentials and IDs

  1. Add your Google API Key as required in the Config node or in environment variables.
  2. Set your Gmail credentials in the Send to Gmail as HTML node.
  3. Enter Google Drive folder ID if you want outputs saved somewhere other than the root folder.
  4. Update the email address to receive the report in the Gmail node.
  5. Check that video IDs and prompt types are entered correctly when testing.

Step 3: Test and activate

  1. Run the workflow from the Start Workflow form with a valid YouTube video ID and choose prompt type.
  2. Check the email and Google Drive for outputs to verify working.
  3. Turn on the workflow in n8n editor to activate for production use.
  4. For more control or cost efficiency, consider self-host n8n.


Inputs and processing steps

The workflow input requires two things: a YouTube video ID and a prompt type like summary or transcript.

It then does the following steps:

  • Builds a YouTube API URL to fetch video metadata.
  • Requests detailed video info using YouTube Data API.
  • Generates an AI prompt about video audience from the metadata.
  • Sends this prompt to Google Gemini AI to get audience analysis.
  • Merges YouTube info and AI audience metadata.
  • Prepares multiple text prompts for different analysis types.
  • Selects the prompt matching user input prompt type.
  • Requests the final video information output from Google Gemini AI using the selected prompt.
  • Converts AI text output from markdown to HTML.
  • Saves the HTML content as a text file on Google Drive.
  • Sends the report email with HTML formatting to a specified address.
  • Returns HTML output and thumbnail to the user via a web form.


Outputs and results

The final outputs of this workflow are:

  • Readable AI-generated summaries, transcripts, or clips with timestamps.
  • Saved text files in Google Drive for easy access anytime.
  • Email reports for quick sharing with team or clients.
  • Web form display for instant user feedback.
  • You get well-structured video insights in minutes instead of hours.


Common edge cases and failures

  • Empty video ID: The form must always have a video ID to avoid breaking the workflow.
  • API errors 401 or 403: Check Google API Key validity and permissions.
  • Malformed AI response: Ensure prompts are correct and quota limits are not exceeded.
  • Google Drive permission issues: Confirm correct folder access.


Customization ideas

  • Change text tone or style by adjusting prompts in the Compose Prompts node.
  • Add new prompt types like quote highlights or deep analysis in the prompt XML structure.
  • Save output files to custom Google Drive folders by changing folder IDs.
  • Send emails to different recipients by changing the address in the Gmail node.
  • Add more YouTube metadata like captions by extending the HTTP request parameters.


Summary of benefits and results

✓ Saves many hours of manual YouTube video review time.
✓ Produces detailed summaries, transcripts, and social clips fast.
✓ Sends results by email and saves files for easy sharing.
✓ Works with simple inputs: video ID and prompt choice.
✓ Easy to configure and run inside n8n automation platform.

→ Enables quick and accurate video content extraction.
→ Powers smarter marketing and content strategies.
→ Gives users accessible formatted reports on demand.


Automate YouTube analysis with n8n and Google AI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Download the workflow file and open the n8n editor. Use Import from File to add the workflow. Then configure Google API Key, Gmail, and Drive credentials before running tests.
Such errors usually mean the Google API Key is invalid, expired, or lacks permission for the YouTube Data API or Google Generative Language API. Check and update API keys in Google Cloud Console.
Yes. The workflow can be extended to loop over a list of video IDs by adding batch or loop nodes in n8n.
It saves the generated text from Google Gemini AI as text files in Google Drive using the Google Drive node, named by video ID and timestamp.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.