Level 2 course; Merging and splitting data

Describe the problem/error/question

Hey all, I am going through the level 2 course right now and loving/hating the content, hating since this is all new to me:)
I remember it was recommended at the beginning of this course to have some type of basic Javascript understanding, which I don’t have, so that might be the problem.

Can anyone explain to me the thought process behind the last exercise in the merging and and splitting data topic, from the level 2 course?
I was nowhere near thinking of getting data through the code node, and didn’t know this was possible.

When trying to look at the given workflow in json code format, the configuration of the code node is empty. (just like when you create a brand new code node). Is this a bug, or how is the approach here?

Thanks for all answers in advance!

What is the error message (if any)?

I can now see that the workflow i copy and pasted below is not the same json code as shown in the course, but after trying to copy/paste that code into n8n twice, I am still clueless. Because the code node is still empty

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Bjorn_Stubrud, I am so sorry for the trouble.

From reading this page it seems to me the Code node is used to return static data here:

Build a workflow that reads the RSS feed from Medium and dev.to. The workflow should consist of three nodes:

  • A Code node that returns the URLs of the RSS feeds of Medium (https://medium.com/feed/n8n-io) and dev.to (https://dev.to/feed/n8n)
  • A Split In Batches node with Batch Size: 1, that takes in the inputs from the Code node and RSS node and iterates over the items.
  • An RSS Read node that gets the URL of the Medium RSS feed, passed as an expression: {{$node["SplitInBatches"].json["url"]}}. The RSS Read node is one of the exception nodes which processes only the first item it receives, so the Split in Batches node is necessary for iterating over multiple items.

So combining this requirement with the example data structure from the previous page you could consider a workflow like below to return two RSS feed URLs, and then loop through them:

When executing this workflow as a whole, you’d fetch elements from both RSS feeds. You can switch between both using the “Run” dropdown on the RSS Feed Read node:

Hope this helps :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.