Lesson Guide: Introduction to Loop Nodes & Bulk Data Processing
In this lesson, you will learn how to automate repeating tasks using Loop Nodes in Noca Flow. Instead of running a workflow for just one item, loops allow you to process collections of records simultaneously. We will walk through how to fetch all accounts from Salesforce and automatically iterate through every single one to update field values based on their specific characteristics.
Step 1: Fetch All Records from Salesforce
To feed a loop dynamically, you first need to extract a list of records to process.
-
Open a blank canvas in Noca Flow with a Manual Trigger.
-
Add a Salesforce Object Read Node immediately after the trigger and select the
Accountobject. -
In the configuration panel under Mapping, change the record retrieval limit to All Available Records.
-
Set up a universal matching condition to catch every record: set
Account Nameto Is Not Empty.
Step 2: Insert the Loop Node & Set It Dynamically
The Loop Node acts as its own self-contained workflow container within your canvas.
-
Add a Loop Node directly after your Read Node. You will see it generate a nested sub-canvas.
-
Look at the properties panel on the right. Rather than typing a hardcoded number (like
10), we want this loop to adjust automatically to our Salesforce database size. -
Open your Data Kit, navigate to your Read Account Node, and look under System Fields.
-
Drag and drop the field labeled
Match Number of Recordsinto the loop limit field.
💡 What just happened? Noca will now check how many total records were fetched (e.g., 13 accounts) and configure the loop to cycle through exactly that many iterations.
Step 3: Extract the “Current Row” inside the Loop
When working inside a loop, referencing your top-level Read Node will pull the entire collection of 13 records at once. To target only the single record currently being processed, you must use the Loop Row data.
-
Inside the Loop sub-canvas, drop a Condition Node.
-
In the right-hand panel, go to your Data Kit and find the Loop dropdown section.
-
Open the Current Row within the loop dataset, search for
Employees, and drag it into your conditional expression. -
Set your rule:
EmployeesGreater than ($>$)100. Name this pathmore than 100.
Step 4: Map Your Branch Update Actions
Now, configure the outcomes inside the loop container.
Path A: Large Accounts
-
Drag a Salesforce Object Update Node onto the
more than 100path inside the loop. -
Map the
Company Sizefield to Large. -
Crucial Validation Step: Under the target record condition, make sure your target
Account IDis equal to theAccount IDfound under the Loop Current Row dataset (do not use the root Read Node ID!).
Path B: Else (Small Accounts)
-
Drag a second Salesforce Object Update Node onto the Else path inside the loop.
-
Map the
Company Sizefield to Small. -
Match the target condition using the same loop iteration identifier:
Account ID$=$ Loop Current RowAccount ID.
Step 5: Save, Run, and Monitor Live Execution
-
Click Save and Run.
-
Watch the execution interface on the right side of the screen. You can monitor Noca evaluation counts in real time as it rapidly iterates through each index (e.g., Iteration 1 of 13, 2 of 13, etc.), making independent routing decisions for every individual row.
-
Open Salesforce and refresh your list view to verify that every single account’s company size has been bulk-updated cleanly!
Key Takeaways
-
Dynamic Limit Mapping: Mapping the
Match Number of Recordssystem field ensures your automation scales safely whether your CRM returns 5 items or 5,000 items. -
The Row Scope: Always use fields inside the Loop > Current Row kit when mapping criteria or modifying items inside a loop structure to prevent updating the wrong dataset rows.
Now that you can run actions sequentially across lists, let’s look at how to control loop lifecycles. Join us in the next video to learn how to break out of a loop prematurely when a specific target condition is met!