Activate this automation on N8nPort with one click
We have completed the workflow installation, node configuration, and setup for you, so the automation is ready to activate without a manual import or node-by-node configuration.
Quick answers
How can I automatically summarize YouTube videos?
You can automatically summarize YouTube videos by using a workflow that takes a video ID, fetches its transcript, processes it with an AI model, and then extracts and saves the summary.
What tools are needed to get YouTube video transcripts and summarize them?
To get YouTube video transcripts and summarize them, you typically need a form trigger, an HTTP request node to fetch transcripts from an external service, an AI agent, and a Google Docs integration to save the output.
Can I save YouTube video summaries directly to Google Docs?
Yes, you can save YouTube video summaries directly to Google Docs by configuring a workflow to insert the generated summary into a new or existing document.
Is it possible to use AI to create social media content from video transcripts?
Yes, an AI agent can process video transcripts to generate concise summaries, which can then be used as a foundation for creating social media posts or other content.
This workflow helps you automatically summarize YouTube video transcripts and save the summaries to Google Docs. It starts when you submit a YouTube video ID through a form. The workflow then fetches the video's transcript, processes it using an AI agent powered by Google Gemini, and extracts a concise summary. Finally, this summary is inserted into a specified Google Docs document, making it easier to create social media content or quickly grasp video highlights.
Key Questions About YouTube Video Summarization
How can I automatically summarize YouTube videos?
You can automatically summarize YouTube videos by using a workflow that takes a video ID, fetches its transcript, processes it with an AI model, and then extracts and saves the summary.
What tools are needed to get YouTube video transcripts and summarize them?
To get YouTube video transcripts and summarize them, you typically need a form trigger, an HTTP request node to fetch transcripts from an external service, an AI agent, and a Google Docs integration to save the output.
Can I save YouTube video summaries directly to Google Docs?
Yes, you can save YouTube video summaries directly to Google Docs by configuring a workflow to insert the generated summary into a new or existing document.
Is it possible to use AI to create social media content from video transcripts?
Yes, an AI agent can process video transcripts to generate concise summaries, which can then be used as a foundation for creating social media posts or other content.
Quick Overview: Summarize YouTube Videos for Social Media
This workflow automates the process of summarizing YouTube video transcripts for social media purposes. It begins with a simple form submission where you provide a YouTube video ID. The system then retrieves the video's transcript, uses an AI agent with Google Gemini to generate a summary, and saves this summary into a Google Docs document. This setup helps content creators and marketers quickly get key insights from videos, simplifying the creation of social media updates or content briefs.
What This Workflow Does
The core function of this workflow is to transform a YouTube video ID into a concise, AI-generated summary, which is then stored in Google Docs. Here's a breakdown of its capabilities:
Initiates from a Form: The process starts when you input a YouTube video ID into a web form. This makes it easy to trigger the automation for any video you need summarized.
Fetches Transcripts: It connects to an external service to retrieve the full transcript of the specified YouTube video. This transcript is the raw material for the summarization.
AI-Powered Summarization: An AI agent, powered by the Google Gemini chat model, reads the entire transcript. It's instructed to provide a concise summary covering main points, topics, and tone.
Formats Output: The AI's output is then processed to extract just the summary text, ensuring a clean and usable result.
Saves to Google Docs: The final summary is automatically inserted into a Google Docs document. This provides a centralized and accessible record of your video summaries.
This automation is designed to save time and effort for anyone who regularly needs to understand or repurpose content from YouTube videos, especially for digital marketing and social media management.
How It Works: A Step-by-Step Explanation
Understanding the sequence of operations helps in setting up and customizing the workflow. Here's how this YouTube video summarization workflow processes information:
Form Submission (On form submission)
The workflow begins with a Form Trigger node. When a user submits the form, providing a YouTube video ID, this node captures the input and starts the workflow execution.
ID Mapping (Mapper)
A Set node, named "Mapper," takes the "Yt Video Id" from the form submission and maps it to a new variable, ytVideoId. This standardizes the input for subsequent steps.
Transcript Retrieval (Youtube Transcriptor)
An HTTP Request node, labeled "Youtube Transcriptor," sends a POST request to an external API (https://youtube-transcriptor-ai.p.rapidapi.com/yt/index.php). It uses the ytVideoId to fetch the video's transcript. This step requires specific API keys and host headers for authentication with the external service.
Transcript Formatting (Formator)
A Code node, "Formator," processes the raw transcript data received from the previous step. It extracts the text from the transcript array and joins all lines into a single, continuous string. This prepares the transcript for the AI agent.
AI Summarization (AI Agent & Google Gemini Chat Model)
The AI Agent node takes the formatted transcript as input. It uses the Google Gemini Chat Model to generate a summary. The agent is configured with a specific system message that instructs it to provide a concise summary of the video, covering main points, topics, and tone, formatted with a "Summary" heading.
Output Optimization (Optimizer)
Another Code node, "Optimizer," refines the output from the AI agent. It parses the AI's response to specifically extract the summary text, ensuring that only the relevant content is passed to the next step.
Saving to Google Docs (Google Docs)
Finally, the Google Docs node takes the extracted summary and inserts it into a specified Google Docs document. This completes the automation, making the summary available for review or further use.
What You Need Before Setup (Prerequisites)
Before you can set up and activate this workflow, you'll need to ensure you have access to and credentials for the following services:
n8n Instance: An active n8n instance where you can import and run workflows.
Google Account: A Google account is necessary for using Google Docs and Google AI services.
External YouTube Transcriptor API Access: The workflow uses an external API (
youtube-transcriptor-ai.p.rapidapi.com) to fetch transcripts. You will need to obtain an API key and host information for this service.
Credential Setup
This workflow requires several credentials to connect to the various services. You will need to configure these within your n8n instance:
Google API Credential: This credential is used by the Google Docs node to authenticate with your Google account and manage documents. You typically set this up as an OAuth 2.0 credential, granting n8n permission to access your Google Docs.
Google Palm API Credential: The Google Gemini Chat Model node uses this credential to interact with Google's AI services. This usually involves providing an API key obtained from your Google Cloud or AI Studio project.
Google AI API Key: Depending on your specific Google AI setup, you might also need a general Google AI API key for broader access to Google's AI models.
Service-specific API Credential (for HTTP Request): For the "Youtube Transcriptor" HTTP Request node, you'll need to provide the
x-rapidapi-hostandx-rapidapi-keyheaders. These are specific to the external transcript API you are using. You would typically create a generic "API Key" credential in n8n and then use its values in the HTTP Request node's header parameters.
Always follow the security best practices for managing your API keys and credentials within n8n, ensuring they are stored securely and have only the necessary permissions.
How to Set It Up: Step-by-Step Guide
Follow these steps to get the workflow running in your n8n instance:
Import the Workflow
First, import the workflow JSON into your n8n instance. You can usually do this by copying the JSON provided by the source and pasting it into the "New Workflow" or "Import" section of your n8n editor.
Configure Credentials
Navigate to the "Credentials" section in your n8n instance. Create and configure the following credentials:
Google API: Set up an OAuth 2.0 credential for Google. During setup, ensure you grant access to Google Docs.
Google Palm API: Create an API key credential using your Google Palm API key.
Google AI API Key: If required, set up another API key credential for your general Google AI API key.
Service-specific API Credential: For the external YouTube Transcriptor API, create a generic "API Key" credential. You will then use the values from this credential in the HTTP Request node.
Once created, link these credentials to their respective nodes in the workflow (Google Docs, Google Gemini Chat Model, and the HTTP Request node).
Customize the Form Trigger
Open the "On form submission" node. You can customize the form title and ensure the "Yt Video Id" field is correctly configured as a required text field.
Configure the HTTP Request Node
Open the "Youtube Transcriptor" node. In the "Header Parameters" section, you will need to add your x-rapidapi-host and x-rapidapi-key. These values should come from your external transcript API provider. You can either paste them directly or reference the service-specific API credential you created.
Set Up Google Docs Node
Open the "Google Docs" node. Select your configured Google API credential. You will also need to specify the documentURL where the summaries should be inserted. This can be an existing Google Docs document URL.
Review AI Agent Prompt
Open the "AI Agent" node. Review the "System Message" to ensure the summarization instructions align with your needs. You can adjust the prompt to change the summary's length, focus, or tone.
Activate the Workflow
After configuring all nodes and credentials, save the workflow. Then, activate it by toggling the "Active" switch in the top right corner of the n8n editor. Your workflow is now ready to run.
Ready to automate?
The complete installation and configuration are already prepared for your workspace. Activate the preconfigured workflow on N8nPort with one click.
Customization Ideas
This workflow provides a solid foundation, but you can adapt it further to suit specific needs:
Change Summary Destination: Instead of Google Docs, you could send the summary to other platforms like Notion, Slack, email, or a database.
Modify AI Prompt: Adjust the system message in the "AI Agent" node to request different summary styles, lengths, or to include specific keywords. For example, you could ask for bullet points suitable for Twitter or a longer paragraph for a blog post.
Add Language Translation: Insert a translation node after the "Optimizer" to translate the summary into multiple languages before saving.
Include Video Metadata: Fetch additional YouTube video metadata (like title, description, tags) and include it alongside the summary in Google Docs.
Conditional Summarization: Add logic to only summarize videos that meet certain criteria, such as length or keyword presence in the title.
Multiple Output Formats: Use additional nodes to generate summaries in different formats (e.g., a short tweet, a longer LinkedIn post) and save them to different locations or fields in Google Docs.
Limitations and Troubleshooting
While this workflow automates a useful process, consider these points:
Transcript Availability: The workflow relies on the availability of a transcript for the YouTube video. If a video does not have a transcript, the external API may return an error, or the AI agent might receive an empty input.
External API Dependency: The "Youtube Transcriptor" node depends on an external service. Any issues with that service (e.g., downtime, rate limits, changes to API) could affect the workflow's functionality.
AI Model Limitations: The quality and accuracy of the summary depend on the AI model (Google Gemini) and the clarity of the transcript. Complex or highly technical videos might require more refined prompts.
Credential Management: Ensure all API keys and credentials are correctly configured and remain valid. Expired or incorrect credentials will prevent the workflow from running.
Error Handling: For production use, consider adding error handling nodes to catch issues like invalid video IDs or API failures, and notify you or retry the operation.
Frequently Asked Questions (FAQs)
What if a YouTube video doesn't have a transcript?
If a video lacks a transcript, the workflow's "Youtube Transcriptor" node may return an error or an empty result, leading to an incomplete or failed summarization. The "Formator" node is designed to handle this by returning a message if the transcript is not available.
Can I use a different AI model for summarization?
Yes, you can swap out the Google Gemini Chat Model node for another compatible AI language model node available in n8n, provided you have the necessary credentials and adjust the AI Agent's configuration accordingly.
How do I specify which Google Docs document to use?
In the "Google Docs" node, you will specify the documentURL parameter. This URL points to the specific Google Docs file where the summary will be inserted.
What kind of YouTube video IDs does this workflow accept?
The workflow expects standard YouTube video IDs, which are typically 11-character alphanumeric strings found in the video's URL (e.g., dQw4w9WgXcQ from youtube.com/watch?v=dQw4w9WgXcQ).
Do I need to pay for the external transcript API?
The external transcript API (youtube-transcriptor-ai.p.rapidapi.com) is a third-party service, and its usage may incur costs or have rate limits. You should check their documentation for details on pricing and usage policies.
Source and Next Steps
This workflow was originally published on the n8n.io community. You can find the original workflow and more details here: Summarize youtube videos from transcript for social media.
Explore the source to understand its structure further or to find updates. Consider adapting this workflow to fit your unique content creation and social media management strategies.
Activate this workflow on N8nPort
Choose your workspace and activate the fully prepared automation with one click.