Can anyone help me understand looping logic better?
I feel like I have this node set up in the wrong position as it will only loop once vs an expected 3 times.
What I’m Trying to Achieve
There are 3 CVs I’m trying to pass to an AI to rank them, each has their own URL. Therefore the automation requires to be looped 3 times.
GET request to download the file
Extract from PDF to get the content
AI Node to perform analysis
Google sheets (using as a database to store URLs & current Job #)
IF node to detect if the loop should end based on the job #
Generally, you can’t refer to nodes before the Loop Node with the .item.json property. You can refer to them only within .last().json, .first().json or .all() methods
Loop node will loop for each item it has as the input (from the Get Job # Node in your case) and only handles data from that node.
You don’t need an If node to finish the Loop. It will be completed as soon as there are no more items left to iterate over. (e.g. if the Get Job # Node has 5 items - then the Loop will iterate over 5 items and then moves to the done branch.