Flows – Advanced

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.

  1. Open a blank canvas in Noca Flow with a Manual Trigger.

  2. Add a Salesforce Object Read Node immediately after the trigger and select the Account object.

  3. In the configuration panel under Mapping, change the record retrieval limit to All Available Records.

  4. Set up a universal matching condition to catch every record: set Account Name to 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.

  1. Add a Loop Node directly after your Read Node. You will see it generate a nested sub-canvas.

  2. 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.

  3. Open your Data Kit, navigate to your Read Account Node, and look under System Fields.

  4. Drag and drop the field labeled Match Number of Records into 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.

  1. Inside the Loop sub-canvas, drop a Condition Node.

  2. In the right-hand panel, go to your Data Kit and find the Loop dropdown section.

  3. Open the Current Row within the loop dataset, search for Employees, and drag it into your conditional expression.

  4. Set your rule: Employees Greater than ($>$) 100. Name this path more than 100.

Step 4: Map Your Branch Update Actions

Now, configure the outcomes inside the loop container.

Path A: Large Accounts

  1. Drag a Salesforce Object Update Node onto the more than 100 path inside the loop.

  2. Map the Company Size field to Large.

  3. Crucial Validation Step: Under the target record condition, make sure your target Account ID is equal to the Account ID found under the Loop Current Row dataset (do not use the root Read Node ID!).

Path B: Else (Small Accounts)

  1. Drag a second Salesforce Object Update Node onto the Else path inside the loop.

  2. Map the Company Size field to Small.

  3. Match the target condition using the same loop iteration identifier: Account ID $=$ Loop Current Row Account ID.

Step 5: Save, Run, and Monitor Live Execution

  1. Click Save and Run.

  2. 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.

  3. 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 Records system 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!