My workflow starts with a google drive trigger, it watches a folder for new uploads of photos then it gets processed from getting it’s metadata and inserting it’s metadata to a supabase table. My problem is and I can’t figure it out for the life of me is how do I process all the items that was fetched by the trigger? For example I uploaded multiple photos in the folder, how will I process all of it consecutively? My existing workflow only always gets the first item.
Information on your n8n setup
n8n version: 1.106.3
Database (default: SQLite): PostgreSQL
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
Sorry, I was all over the place with this workflow.
I also had to change the nodes as I can’t figure out on how to trigger a google drive on file update and file create that is inside a sub-folder, I guess my only option was to create a trigger for each sub-node.
This error happens because you are referencing the output of a node, which contained multiple items. The IF node output 2 items, and in the Set Photo Data you say - grab this value from the output item of the IF node. The error explains that you can choose first or last or one with a specific numerical index, but you cannot reference just some item.
I kind of have an idea about the error, my problem now is whatever I use (.item, .first(), all()[0]), it always only process one item, I’m just guessing that there’s really no way to process all items that was fetched by the trigger node? It just might be how google API is.
BTW thank you so much for your time, really appreciate it.
What you could do is you could wrap all the nodes after the IF node in a Loop Over Items and go one by one, then in the Set node you could reference a singular item from the Loop node and this wont be ambiguous (as it goes one at a time).