Full transcript of “N8n youtube summarize videos workflow (+ template)”. Click a timestamp to open the video at that moment. Need another video? Use the YouTube transcript generator.
0:00 YouTube videos are getting longer and longer. Sometimes we just want to get to the key points, and sometimes we're not even sure. We want to watch the video, the solution, get fast, accurate, AI summaries and all of that for free. In this tutorial, I will show you how to set up from scratch and N eight N Automation that will get the transcripts from YouTube then use Google Gemini to summarize in a concise manner. This is simpler. AI with me Ysqander. Let's dive in. So let's do this together. I'm gonna start this on a blank account, no workflows, no credentials, so that I make sure that I cover all the details and that everything is wired up on your end. We're gonna create a workflow from scratch and we're gonna
0:47 import from file from the JSON that is in the comments. So post the video, do that, and you should get the workflow template set up. Now let's look at each component and understand what they do. The first block is, and when executed by another workflow node that lets you hook up this workflow into other workflows. Then we do some basic editing of fields. Then we send a URL to this service, a Apify scrape. It's basically scrapes the YouTube page of that video and downloads the script and provides you with an output. Now the output is a list of strings. Therefore, we need to format it a little bit into a text block, which
1:34 we then send to a an LLM chain. In this case, I use google Gemini two flash because one, it's for free. And second, it has a huge context window. So that should be great for YouTube transcripts. And then we just format the output fields when we send this out. Okay, so we're gonna call this workflow template, and we're gonna refer to it from time to time, but we're gonna do this now from scratch so that we make sure that everything is understood and replicable on your end. So let's go here, create a new workflow. Let's call it YouTube video summarizer. First, we need to add this when executed by another workflow node.
2:23 So let's type execute it's under execute sub workflow and when executed by another workflow. So then you get this output. On the left side you can input the data mode, select, define using fields below. Add a field, call it query. That's usually what the AI agents use as default for the name, and then leave it as string. Then we're gonna click over here on setting some mock data, and then you get this default template. We're gonna remove this schema and we're gonna replicate what we called the input that's gonna be query. And here we're gonna put a YouTube video.
3:08 Let's put this. YouTube video from a speech made by the YouTube CEO. Let's take the link, paste it here. This will serve as as a test. Watch out for the commas if you have errors. No commas at the end of a single item. Then save, and then test the step. Or not, don't test it now. Actually, now it's pinned. This information will go as default. So that's all we need. Then let's set another field because I don't like to call my variables in my workflow just query. So we're gonna call this something else. We're gonna call this. YouTube not all caps, YouTube, URL, so that when we see it in the next steps we know what it is not just a generic name.
3:58 They go, now we renamed it YouTube, URL, then we're gonna move to the next step. And that's adding an HTTP request. This is where we are going to make a request to Apify. Apify is a service that gives you access to a lot of different scrapers and APIs. You can sign up at Apify.com. They give you $5 of credits free and for YouTube transcripts that should be enough for a few hundred transcripts in a month. But you can explore more of those scrapers in their store. There's a lot of very useful stuff. I will leave a link below so you can sign up. Once you've done that, you go to your personal account and you're
4:47 gonna need to go to the API on the right hand side here on the top. And then you're gonna go to manage tokens Now. There you're gonna see a default, API token. That's the one we're gonna use to identify ourselves. So we're just gonna copy that, go back to our workflow. And then we are gonna set generic credential types here under identification. And we're gonna set a query off. This just means that the identification is appended to the URL when we make a request. So then we create new credentials. That's the query Auth account. The name will be token, and the value will be the value
5:32 that we've just copied. So our default API key. Let's save this. And the credential has been created. Now we need to put the method for the request to be a post because we're gonna send some information together with our request, and then we go back to the template that we opened. Initially, it'll have the API endpoint for that specific service. That we looked at. So it's a post here and then we're gonna paste the details so I can show you the scraper. That was this one. So it's called caramel YouTube transcripts. Here we can see some details. It costs around $7 per 1000 script transcripts,
6:20 so a few pennies per runs. On this tab on Apify, you can see the runs I've tested before. One transcript is not even a cent, so it's pretty cheap and pretty convenient. Okay. Once we set those parameters and the credentials, we're gonna go down here to send body. We're gonna switch that on. Then we're gonna check that the type is JSON using the fields below. Actually we're gonna do using JSON so that we can just paste the input that was in the template that I've provided. Copy that and paste. Here. So it just gives some parameters to that service maximum retries for use Apify proxy.
7:05 True. That's just to avoid that YouTube blocks requests, that's typical for scrapers. And then in the URLs, that's where we are taking the YouTube URL. That's the field that we renamed, but if you wanna name it anything else, you can change the names and then just drag this. And into here, and you will get the same result. Now is the time to test It takes about 30 seconds, no output data returned. Okay, I got the issue. So when pasting things in N eight N, make sure that this is not fixed, but as an expression, otherwise these
7:52 values that are referring to previous nodes will not evaluate. And they will just pass basically text. So let's test it now, and the value that YouTube RL has now should pass through to Apify. And then there you go. And the channel handle is Tube body. That's exactly it. And then we have captions. And it's always good to look at the data in various formats. So when you look at JSON, you can see the format better. So the captions are basically small sentences delimited by comma. So that's not that great for working with llms. But we can format this ourselves. So we go back to the Canva, we add a code node.
8:39 And we just gonna run some some quick JavaScript. So you go back to the template, go into that code, and just copy this whole thing. This should be relatively straightforward. Let's see what it does for each of the items in in the output, in the captions. It'll just clean up the captions. So sometimes there is HTML symbols, so it'll match them with what they mean so that the format is clean. Yeah it'll clean up some standard things to make sure that we get nice clean text and not symbols or mismatched punctuation. And it will just put the transcript as clean text.
9:25 And then together with video Id just so that we are able to track it and then return the output. Now this should work directly. Let's just test that. And there you go. So we get the video ID and then the transcript with a block of text and everything looks nice. There are no strange symbols. Great. So let's look back at our template. So now we've done these steps. We get a nice formatted block of text. Now we're gonna add the ai summary unit. Let's go back here to our working file. And we're just going to take advanced ai, then a basic LLM chain.
10:11 We're gonna define the what we're gonna do. So choose, define below here for the source for the prompt. When I look back at what we did, very simple. You just said, summarize the transcript below. You can refine this as you want, as you see the results. And and if you want to improve them, you can refine here. But all we did was basically give it the transcript. From the code block, we just take transcript, drag it here. And boom. Then we get this text. And now we just need to add an LLM to this node. So we go back here in the model, we add we add the model here. I choose Google Gemini chat model and we need to create new credentials.
10:57 We are gonna go to Google Studio ai. It's important to use the studio AI because Google has other pages for more advanced users. But the simplest is to use Google Studio ai, then sign in. I take one of my accounts. And I am in. And here you can play around with the Gemini models, but for now we only need an API key. Remember it's a free it doesn't really matter. Create an API key. It used to be that you could get an API key directly, but I see now that you need to have a project. So let me quickly show you you go to Google Cloud Console, Google Cloud platform or I already have projects,
11:46 but let's create a new project. Let's create N eight N test Okay, now it's creating a new project here on the site. Select the project. And let's see if it appears here already or if you, we need to, yeah, we need to enable, we need to enable an API here in the quick axis, and then we're gonna search for gener generative language. It's a little bit cumbersome I have to say, but generative generative ai. Let's fraud it for free. Oh, that's not the right thing. I just wanna enable, enable API services.
12:31 Let's try this again. So what I did was I clicked on Enable API and services. I think the search leads you to the to the explanation and documentation, whereas I just need generative ai. There we go. Gemini, API. That's the one. Gemini. API Enable. Make sure you are under the project name. If you have all the projects. You've done this before, so that's probably not an issue, but this should be fine now. So if I go create project, there you go. N eight and test. Create an API key, an existing project.
13:20 Alright, and now we've got our API key. We go back to our credentials. The host is correct and the API key we paste it here. And we save connection tested successfully. Great. Now we go back to our chat model node, Google Gemini account. And now here we select the model and they have tons of models. It's quite messy, but the one we like and we're gonna use is models. Gemini 2.0, flash, that's the latest. It's not an experimental, it's stable. And it's fast for our purpose. Let's go back to the canvas Let's now test the summarization output. So test step.
14:07 Now that should send that transcript block to Gemini, and then we get an output. Now let's check in a recent announcement. The YouTube see outline major updates for 2025. And yeah, that looks like a summary because the transcript is different. So there you go. Now in my template, what I like to do is so if you look at my, the template, I had an edit field because I like to track the video id as well as the output just for debugging. So let's just add that it's set field and we're gonna pick up the so manual mapping mode, and we're gonna pick up video ID from the code block put here. And then from the LLM chain, the text, that's the summary. We're gonna put it here.
14:53 That's gonna be our final output. That should be fine. And that's gonna be the output that the whatever your workflows you hook this into will receive. We go back to the canvas now and we just test the workflow once again, just for a final check that , nothing is wrong. It takes a bit of time, but I like these visualizations. And there you go. Workflow executed successfully and we got an output in the end. So now we have a ready-made video summarizer workflow, which we can hook into any other workflows. I'll show you my setup. I like to use Telegram to trigger workflows. And in this one I have hooked up the YouTube video summarizer to an AI agent.
15:39 I will, by the way, link to a video by Leon van Zyl who has a great YouTube channel about AI and automations, and he explains how to set up this telegram personal assistant set up very well. There's no need for me to reinvent the wheel but let's just test our summarizer. I'll go to telegram. Just need a link to test. I have this web development video and I go back to my telegram, or I have the bot and I say, summarize this video, paste it in, and let's see. All right. This video, the creator shares the seek to making web design stand out. Yeah. And this is what I love about N eight N, is that
16:26 you can set up and customize these workflows to suit you. So now I can be on the go and I see some video maybe while I'm waiting for something else, and I can just get a little quick summary just with my Telegram account. Hey, Ysqander back. If you like this video, please subscribe and push the like button. It'll help grow this small channel. I will talk about more automations and more practical AI topics in the coming days and weeks. Thanks for watching. Take care.