Multiple RSS Feeds to E-Mail

Hi there,
I´m trying to send the latest entries from different rss feeds once a week via e-mail. So I copied the workflow form here: https://n8n.io/workflows/1160

Now I ask myself: Why is “Merge Data Node” empty?

Further questions:

  • How can I limit the entries to the 3 latest posts from each rss feed?

Here is the workflow so far:

Thank you for all your help
Floyd

1 Like

Hi @Floyd

I tested the same workflow with a different URL. It’s working well.

Can you make sure the input URL is correct in the First Function Node?

Here is mine

image

1 Like

Hi @mcnaveen and thank you for your answer. I used your URL of the RSS feed and it works a little bit better.

Your feed URL is formatted as , whereas my feed URLs are formatted as XML. Does this make a difference? Do I have to transform the XML into another format? If so, which node can I use for it?

Further on I thought the output of the node “Merge data” is the data from both RSS feeds in one output, that can be sent via email?

But sadly if I execute the node, there are no entries merged. It is empty. Maybe there is something wrong with the javascript? Sorry, as you can see, I´m not a javascript developer.

So the JSON output in the node merge data is empty. See “allData” in the following screenshot:

Maybe you have an advice for me?

Thanks for your time and help so far.

1 Like

Hi @Floyd

You don’t have to change anything.

I tried the same workflow with a different .xml URL it works for me. You don’t need any other node to convert it from XML to JSON.

Is your feed URL accessible via Browser? Is there any authentication for that?

Also, Can you check this workflow?

Please note that I haven’t modified anything in this Workflow

1 Like

Hey @mcnaveen, thanks again for your help.

Also, Can you check this workflow?

I did and it worked. The two rss feeds I want to implement are:
https://customerthink.com/feed/
https://www.cxnetwork.com/rss/articles

If you follow the two links, they are reachable and readable via browser. Without authentication. That´s why I can´t imagine what the problem is. Maybe you have a suggestion?

Another question:
Your example works. Is it possible to send all the “items” from the Data Merge node in one email? I added the node Send Mail, but don´t know what to select to sen “allData” in one email. I only can see every single item of the feeds. But I want all the items to be sent in one email.

I want to send a news mail to my friends styled like this:

Title of the Article
Short description of the article
Link to the article

Title of the Article
Short description of the article
Link to the article

Maybe you have a solution for this?

Thank. you for your help!

2 Likes

I’m too stuck at this point.
@MutedJam Can you help here? It’ll be worth learning for me as well.

1 Like

I actually do something similar in one of my workflows :slight_smile:

So @Floyd, assuming you have your workflow set up as suggested by @mcnaveen, you now have all the items you want to include in your email inside the allData object right? You could add another Function node to build the HTML of the email you’d like to send and then use that HTML code in the Send Email node.

Here is a quick example you can adjust to your needs:

Example Workflow

In the example I’ve commented each new line of code to explain what it does.

Result:

As you can see there’s a reason I don’t work as an email designer :wink:. This should still be a useful baseline to build your own email design from.

Hi and so many thanks @MutedJam. This helps me a lot. Especially in understanding the usage exactly.

Sadly I´m still facing some problems, which I can´t explain.

The first time the workflow passes the rss node it generates 10 entries from the first rss feed. When it passes the RSS node the second time, the entries from the second rss feed are generated. 12 items. There are 22 entries from both feed urls generated, but only 12 items are passed to the “Merge Data” node. Shouldn´t this be 22 entries?

Maybe this screenshot helps a little bit to visualize my question?

I can see the articles of both feed urls in the rss node, but I can´t see the entries later on in the Send mail node. I know, that the entries are set up in the “Build E-Mail” node, but it was just to proof for me, why there are no entries in the generated mail.

Here a little visualization that might help:

Sorry for asking so many questions, but everytime I use the workflow, there is something strange, but always at a different node of the workflow :wink:

Thank you for your help
Floyd

1 Like

Hi @Floyd, no problem at all. Personally I avoid the RSS Read node altogether because it behaves different from most other n8n nodes and requires this loop. Instead I almost always use the HTTP Request node and an XML node afterwards which works much better for my use cases.

That said, the workflow I shared is working fine for me and the resulting email contains items from both feeds. I suspect one of your feeds might not have the properties I used to build the email html (edit: or the Merge Data node references a node with a different name, seeing your RSS Feed Read node is named RSS Feed Read2 rather than RSS Feed Read like in the workflow shared by @mcnaveen). Could you share the exact workflow you are currently using so I can double-check this?

Also, are you executing the whole workflow when testing this or just single nodes? Might be worth running the whole workflow to see if this changes the behavior.

2 Likes

Hey @MutedJam. thank you. The empty node was really caused by the name of the RSS node. I changed it to ‘RSS Feed Read’ and it works now. Great. Thank you for your hawkeye!

So do you see a chance to just send articles/posts from the RSS feeds, that haven´t been sent via email before?

One further question regarding your workflow, because I´m very curious :wink:
Could you share an example workflow with the http request node and an XML node afterwords? How do you achieve multiple http requests then?

Background:
My goal is to get the X latest posts from different rss feeds and send it to me via email. Actually I had some problems with the RSS node, that some of the feeds could not be read. But the URL is reachable and there is no protection of the RSS URL. I don´t have the feeling, that the RSS node is the best way to go with :wink:

Thanks for your help and speed in response.

Ok, I tried my best to receive the latest rss entries, that haven´t been sent via email before @MutedJam. I integrated an “Only get news RSS” function, which should chck the date and pass the latest entries to the next node.

It doesn´t work the way I expected, but surely there is only a simple misunderstanding in the function? Maybe someone can give me a hint what I should adapt or change in the workflow?

Thanks for all your help in advance!

Hey @Floyd, just a quick note to let you know I haven’t forgotten you but it has been a rather busy week, so I couldn’t answer all questions yet.

Anyway, fetching multiple feeds with the HTTP Request node (and avoiding the loop) isn’t too hard, you can find a quick example below.

As for keeping only recent examples, you could use an IF node filtering for a date since your last run. E.g. if you run your workflow every day, you could make sure to only include items newer than 24 hours to avoid duplicates.

Here’s an example showing both:

Example Workflow
1 Like

Thanks @MutedJam for taking time even in a busy week. Ok, now I understand, why you prefer to use HTTP request in combination with the XML node. This workflow seems a lot smoother to me.

A really very well built workflow with a lot of learnings for me. Thank you for sharing your knowledge and for helping me with my problem.

Really appreciate all of the help here in the community.
Floyd

1 Like

Hi Newbie here.

I’d like to merge these RSS feeds into a single RSS feed

https://transition.at/feed
https://www.reseautransition.be/feed

Is there an example workflow that outputs a single RSS feed for multiple RSS feed Inputs?

1 Like

Hi @samuk

You can use Merge Node for this.

how about more than 2 feeds?

Hi Guys, I want to get items from multiple rss feeds. I am using a combination of the workflow above, I especially like the IF to get new items for the past 24h from @MutedJam.

My issue is, while its working fine having a list or URL feeds inside a Function/Code node, I want to retrieve a list from airtable. I tried to get this going by retrieving a list from airtable and using the Set module to define name and feed, but I am running in to issues, the workflow does not response in the same, and it messes up the loop.

Here is a screenshot of the workflow Screenshot by Lightshot

Screenshot of the output from the Set module Screenshot by Lightshot

Then when it finishes the loop I get: Problem in node ‘RSS Feed Read‘ The parameter “URL” has to be set!

any help would be greatly appreciated.
Thanks

any thoughts @MutedJam ? thanks

Hi @myWebmaster, this is a rather old thread so I’ve missed your previous comment. Your Set node output look good to me though. How does your workflow look like and which value are you setting in your RSS Feed Read node?