How to iterate over results with the Youtube Search node?

Describe the issue/error/question

Hey everyone, I have been trying to create a workflow to send Youtube search results in a Google Spreadsheet, but for some reason, when I run the workflow, only a single result is send to the spreadsheet, even though 25 results are returned by the Youtube Search node (here’s the spreadsheet with the results)

As you see below, I have tried to add a function node, but it hasn’t worked

Any ideas of how to fix this?

My workflow

Information on your n8n setup

  • n8n version:0.160.0
  • Running n8n via the desktop app

Hi @moniquebma,

The YouTube1 node returns - for whatever reason - only 1 result. This looks like a bug. No big deal, then we force it to call each ChanelId separately (Via SplitInBatch) and merge the results again (new Function).

Unfortunately I can’t understand your function. I don’t get a ‘data’ attribute back from the API.

Info: I could not test the transfer to Google Spreetsheet, but with the full object it should not be a problem now.

n8n: v0.164.1 over node v16.14.0, npm 8.5.1 on win-10

Translated with www.DeepL.com

1 Like