AI Income LabJoin AI Income Lab ↗

n8n RSS to LinkedIn newsletter with Apify and Claude

Jump to video chapters

Watch on YouTube ↗ Subscribe on YouTube ↗

By · · 13:40 · 358 views

An n8n workflow that watches a YouTube channel's RSS feed, pulls the new video's transcript with Apify, and has Claude write a 400-word LinkedIn newsletter that is saved to Google Docs. The run works in the demo. Posting to LinkedIn stays manual because Mike cannot verify his account and prefers not to automate LinkedIn.

Video summary

In this tutorial you’ll learn how to automatically turn YouTube video transcripts into LinkedIn newsletters using N8N. Whether you’re a content creator, marketer, or business owner, this guide will help you save hours every week by repurposing your video content into ready-to-post LinkedIn newsletters in minutes.

The video covers 9 parts: Automation Overview, RSS Feed Setup, YouTube Transcript Scraper, Splitting Transcript Items, Aggregating Full Transcript, Claude Newsletter Prompt, Google Docs API Setup, Create And Update Document, and Manual LinkedIn Posting.

What this video covers

What you build

An n8n workflow with an RSS trigger every 10 minutes, an Apify transcript actor, split and aggregate steps, a Claude newsletter prompt, and Google Docs create and update nodes.

Tools used

Compare pricing: Apify. Some ↗ links are affiliate links, so I may earn a commission or credit. See every tool I recommend →

Key steps

Not covered

Summary written from the video's transcript and chapters.

In this video

  1. 0:00 Automation Overview
  2. 0:45 RSS Feed Setup
  3. 1:34 YouTube Transcript Scraper
  4. 2:32 Splitting Transcript Items
  5. 3:25 Aggregating Full Transcript
  6. 4:20 Claude Newsletter Prompt
  7. 5:18 Google Docs API Setup
  8. 6:25 Create And Update Document
  9. 7:30 Manual LinkedIn Posting

Questions and answers

Why not post to LinkedIn automatically?

Mike cannot get the credentials verified and also worries that LinkedIn may detect automation.

Why remove the timestamps?

The transcript actor returns lines with timestamps, so the workflow splits and aggregates them into plain text for the prompt.

What does the n8n LinkedIn newsletter workflow need?

An Apify account and actor, an Anthropic API key, and Google Cloud OAuth credentials for Docs and Drive.

Transcript

Hey there, welcome to the channel. In this video, I'm going to take you through a relatively simple automation that I've built out here in Nin to automatically grab my latest YouTube video when I upload it using the RSS trigger right here. And then we're going to run it through Apify and get the items, split them out, aggregate them, put them into Claude to create a newsletter from the transcript. And then I'm just going to put it into Google Docs.

From here, we can also post it on LinkedIn, YouTube, Facebook, wherever you want. But in this case, I'm just putting it into Google Docs to store and then I can edit it later and post it on LinkedIn in this case. So, hope you're excited to learn how to build this automation. If you wouldn't mind, please like this video, go ahead, subscribe to the channel, and with that being said, let's get into it. So, first of all, I'm just going to zoom in on this particular node.

Read the rest of the transcript

This is the RSS feed, and we're just going to run this every 10 minutes in this particular case. So, you can set how often you want this to run, similar to a scheduled trigger, but this is the RSS feed. So, in order to get this one, you just come over here, you search for RSS feed trigger, and then you can add that in. Nice thing about doing it this way is that it's much easier to just grab the latest video.

You will pass in your uh YouTube feed XML right here and then just the channel ID of your YouTube channel. So, as you can see, my latest video is how to run chatbt locally on Linux with O Lama. There's the link which we're going to need in the next step. And from here, we can just run this particular appy actor. So, in order to get started with Apify, you're just going to open up Amplify.

And you will need to log into your account over here in Apify. And I'm using the YouTube transcript scraper. So, if you come to actors, you can just find this particular uh YouTube transcript scraper. And all you need is a is a URL. So we're just passing in the URL from the previous step that we got from the RSS feed. And then this is just going to extract the transcript. So you can see the output here.

It's just going to output the transcript right here with all of the timestamps which we're going to want to remove. So I'll show you how to do that a little bit later. But first of all, we just need to pass in the video URL which we got from the RSS feed uh in the previous step. So you just click and drag this in and it will automatically wait for it to finish. And you will need to select the actor obviously.

So you just come over here and you can select that one. You will need to make sure to save this first. So if you come back to your actor, you just need to come down here and click on save to make sure that it's actually saved. Right? So once that's done, you can pull it into n8n over here and then just select it here. Um and then from there, you will just pass in the URL from the RSS feed.

And then the next step is we're going to get those data set items. So, we're just going to add in another Apify node and we're going to pass in the data set ID. So, if you want to just scroll down over here, you can search for data set and then you're going to pass in the default data set ID. So, you just click and drag that in and then that will get all of the items with timestamps.

So, if I want to just pin this, I can click on P. It will pin this actor and it will just pass in that one item. And then from there we can click on execute step and you will see here's the entire transcript with all of the timestamps. Now the thing is I don't actually want to pass in all these timestamps. I want to extract them and only include the transcript in plain text. So we just want to split this up.

So that's what we're going to do in the next step. We're going to call the split out module. In order to find this, you just come over here and you search for split out. And then you can split out each of the data set items. So you're just going to click and drag in the data that we got from the previous step. Get data set items. And the output is going to look something like this. So there we go. Now it's just split it up.

And then from there we can just go ahead and pin that. And the next step is going to be aggregating this. So come over here once again and search for aggregate. Add this node into the workflow. and we'll select individual fields. And then we're just going to pass in the text over here. So, this is all of the text that we got from the previous step. And you're going to want to make sure to select uh merge list. So, just turn on merge list right here.

Right there. Um turn on merge list. And you're just going to select that from here. And then you can execute that step. As you can see, there's the text in one list, right? So, now we've got the entire transcript from the latest YouTube video. And again, this is just going to be running every 10 minutes. Or you I could just set this to be every 30 minutes cuz chances are I'm not posting a YouTube video more often than that.

Or we could just set it for x uh 60 minutes. Every hour is going to run. Right. So, now we've got the transcript. And in this case, I'm just going to add in a Claude model. So I want to message Claude in this case. I typically use ChatgPT, but I've got some API credits right now on Claude. So I just decided why not use Claude. And it's also better at writing as well in a lot of cases.

So you're just going to select Claude and then message a model right here. You can drop this in. And then you want to uh create your prompt. So in this case, this is the prompt that I'm using. You are a professional writer creating LinkedIn newsletters for a broad business audience. I could just put AI automation audience right there, but that's okay for now. I will share a YouTube transcript with you.

Using that transcript, write a complete 400word LinkedIn newsletter that explains ideas clearly and simply at about a sixth grade reading level. So, that's one thing that I made sure to uh use over here. And I used chatpt to create this entire prompt, by the way. Um, so it's just a 400word LinkedIn newsletter prompt right here. And then I will you will need to get your API key.

So in order to do that, you're just going to go to uh, you know, Claude's website, the API access site, and then you can create a key from here. So just create your key and then you can uh, connect it up using your credentials. So in this case, you would just pass in an API key and then also a secret key. Well, in this case, just API key, right? And then connect it up. That's all there is to it.

Then obviously you can select your model here as well. And then you just pass in the prompt and make sure to include your full transcript here at the bottom. So it just says, now here is the YouTube transcript. You're going to click and drag in the text from the aggregator node. And then this is what it's going to look like, right? So, there's the entire prompt and this is the entire transcript from the YouTube video, right? Pretty straightforward. So, that's all there is to it.

And you're going to want to make sure to turn on simplify output as well. So, that's going to run. And then the next step is just going to be creating the document. So, you're going to want to add in a Google Doc. So, just come over here and search for Google Docs. going to add this note in and then just select create a document. Now, in order to set this up properly, you will need to do a bit of work in Google Cloud Cloud Console.

So, you're going to want to add your Google Cloud Console. I'm just going to bring that up real quick over here. And you want to add in the necessary API credentials. So, I've already got my own project set up over here. You're going to want to search for Google Docs up here. And then you will just select enable. So, in this case, I've already enabled it on my account. If I want to manage this, I can click on manage. And you'll see over here the credentials.

So, here's the credentials for Google Docs. If I open this up, you're going to see the Google uh the client ID and the secret as well. You're just going to copy and paste that in over here. So, you just click on create new credential and then you will add your client ID and client secret from Google Cloud Console. And you also want to make sure to set up your OOTH consent consent screen as well over here. So, once that's done, you can uh add it in.

And you're also going to want to make sure to set up Google Drive as well. So you want to enable this API as well because it's going to be storing the documents on Google Drive using their API. So once that's done, you should be able to create the document on your drive. And in this case, I just have a newsletters folder and I'm calling it LinkedIn newsletter for now. So it's creating that file in Google Docs, which is over here.

So it's created the LinkedIn newsletter and from there we're just going to update that document. So this is where we're actually passing in the text output from Claude and that would be the document ID right here. So you just click in your your document ID and then you're going to pass in the text that was generated using Claude AI. So, I'm just going to run this node once again and then we can pass in the correct text over here.

It takes a little while to run and then that will create the entire newsletter for LinkedIn and then we can put it into its own Google document. And then from there, you can actually just post it directly to LinkedIn as well. But in this particular case, uh it's a little bit more difficult for me because I'm not able to get everything verified unfortunately. So, I'm just putting it into a Google doc for now. So, that should have updated the document.

If we come back over here, we've got the LinkedIn newsletter. We can just go ahead and click on that. And here's the latest uh LinkedIn newsletter right here. So, it just created this entire document. And then I can go ahead and post this on LinkedIn or I can automate that step as well if I want to. So if I just come over here and click on LinkedIn, you can create a post.

But I am having some issues verifying this or getting the correct credentials because my account is not verified on LinkedIn. So this step I would just save for later and then I can just post this manually. The most important thing that I want to get done with this automation is to actually create the LinkedIn newsletters and then I can post them later. Right? So once again, it's just getting the the latest YouTube video using this RSS feed reader right here.

It's running that amplify actor, which we've pinned for now. I can go ahead and unpin that. And we can just run this again. So it's going to run Apify actor. It's going to get the data set items. It's going to split them out, aggregate them into the complete transcript, and then it's going to run it through Claude to create the LinkedIn newsletter like it's doing right now. And it's just going to create that document. and update it.

And since I've called it LinkedIn newsletter, let's go ahead and unpin this as well. It will just update it right away. So, we should see this refresh over here once it's finished running. And there we go. So, now it's updated the document. We've got a new fresh newsletter in here. And that's pretty much all there is to it. Obviously, now I can go ahead and take this and copy and paste it and put it into a newsletter over here on LinkedIn.

This part's relatively straightforward, so I don't necessarily need to automate it. And I would be a little bit careful with automating things on LinkedIn as well because sometimes, you know, they have ways to track this. So, it's better just to do this part manually. And then I would just add this to my newsletter over here. So just click on create, write a new article. Now I could just copy and paste in this entire newsletter.

I can also include a link to the full uh YouTube video over here. So I'll just copy and paste my link right here. Get the sharable link. And then I'll just say watch the full video here. And then from here I can just, you know, put up this newsletter and notify all of my followers on LinkedIn. So yeah, hopefully this was uh helpful for you guys. Go ahead and subscribe to the channel for more tutorials.

I look forward to sharing more of these builds in n8n moving forward. And with that being said, see you in the next one. Take care. Stay safe. Signing off. Peace from Thailand.

Not ready to join? Get the weekly build notes: new guides and tested builds in one short email.

You may also like