<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Yasir</title>
    <description>The latest articles on DEV Community by Muhammad Yasir (@yasiralkahtani).</description>
    <link>https://dev.to/yasiralkahtani</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2893858%2Fac5f2365-41c8-4947-95cb-fd286bf665cc.jpg</url>
      <title>DEV Community: Muhammad Yasir</title>
      <link>https://dev.to/yasiralkahtani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yasiralkahtani"/>
    <language>en</language>
    <item>
      <title>Why You Should Use the “Do Until” Loop More Often in Power Automate</title>
      <dc:creator>Muhammad Yasir</dc:creator>
      <pubDate>Sun, 23 Feb 2025 08:46:28 +0000</pubDate>
      <link>https://dev.to/yasiralkahtani/why-you-should-use-the-do-until-loop-more-often-in-power-automate-4fkm</link>
      <guid>https://dev.to/yasiralkahtani/why-you-should-use-the-do-until-loop-more-often-in-power-automate-4fkm</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Did you know Power Automate has two types of loops, but one is often forgotten ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zs64hhy8ydhkv19p0yv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zs64hhy8ydhkv19p0yv.png" alt="extintion of Do Until" width="800" height="557"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Power Automate can execute a set of actions repetitively using loop controls. There are two types of loops in Power Automate: &lt;strong&gt;For Each (Apply to Each)&lt;/strong&gt; and &lt;strong&gt;Do Until&lt;/strong&gt;. However, there are significant differences between them that developers should understand before building a workflow.&lt;/p&gt;

&lt;p&gt;Most developers are more familiar with the &lt;strong&gt;For Each (Apply to Each)&lt;/strong&gt; loop because it is simple and requires minimal effort to set up, while &lt;strong&gt;Do Until&lt;/strong&gt; is often overlooked. In this article, we’ll break down when to use each loop to optimize workflow performance and efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Loops in Power Automate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1️⃣ &lt;strong&gt;For Each (Apply to Each) — Collection-Based Loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;executes actions for each item in a collection (array, list or dataset).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Use Case&lt;/strong&gt;: Sending a reminder to multiple users&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Scenario&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you have a list user in sharepoints.&lt;/li&gt;
&lt;li&gt;you want to remind all users about their training that needs to be finished until a certain period of time.&lt;/li&gt;
&lt;li&gt;you read the list in power automate and iterate using For Each loop to send a reminder to each user.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo6t575tvk31lw9qmn6a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flo6t575tvk31lw9qmn6a.png" alt="Use of For Each Loop" width="577" height="1075"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;Do Until — Condition-Based Loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Executes actions until a specific condition is met.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Use Case&lt;/strong&gt;: Fetching Paginated Data from an API Until All Records Are Retrieved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Scenario:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are working with an API that returns paginated results, meaning only a limited number of records are retrieved per request (e.g., 100 items per page).&lt;/li&gt;
&lt;li&gt;you make &lt;strong&gt;multiple API requests&lt;/strong&gt;, increasing the page number each time or update url with &lt;strong&gt;next page&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop&lt;/strong&gt; when there are &lt;strong&gt;no more pages left&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo15jxb589wx0bnv7ymvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo15jxb589wx0bnv7ymvx.png" alt="Use of Do Until loop" width="798" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key Differences: Do Until vs. For Each&lt;/p&gt;

&lt;p&gt;When working with loops in Power Automate, choosing between Do Until and For Each (Apply to Each) depends on your workflow requirements. While both loops help automate repetitive tasks, they serve different purposes and function differently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F690avr7kzjh6qzw915va.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F690avr7kzjh6qzw915va.png" alt="Table of Key Differences" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use Each?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developers often use &lt;strong&gt;For Each (Apply to Each)&lt;/strong&gt; by default, regardless of the workflow’s actual needs, while &lt;strong&gt;Do Until&lt;/strong&gt; is often overlooked. However, choosing the right loop can significantly improve efficiency and optimize automation processes. Understanding when to use each loop is essential for building effective workflows.&lt;/p&gt;

&lt;p&gt;Use For Each when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need to process a predefined collection (emails, records, files, etc.).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The loop should run a fixed number of times based on data count.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use Do Until when:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The number of iterations is unknown.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need to wait for a condition to be met (e.g., API response, approval, system update).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For Each:&lt;/strong&gt; Avoid unnecessary loops by filtering data before processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do Until:&lt;/strong&gt; Set a timeout or max iteration limit to prevent infinite loops.&lt;/li&gt;
&lt;li&gt;Use logging and monitoring to track loop performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What’s your experience? Share your thoughts in the comments!&lt;/p&gt;

</description>
      <category>powerautomate</category>
      <category>powerplatform</category>
      <category>lowcode</category>
      <category>powerapps</category>
    </item>
    <item>
      <title>Power Automate Functions (fx): A New Feature for Smarter Workflows</title>
      <dc:creator>Muhammad Yasir</dc:creator>
      <pubDate>Sat, 22 Feb 2025 06:36:22 +0000</pubDate>
      <link>https://dev.to/yasiralkahtani/power-automate-functions-fx-a-new-feature-for-smarter-workflows-5gjo</link>
      <guid>https://dev.to/yasiralkahtani/power-automate-functions-fx-a-new-feature-for-smarter-workflows-5gjo</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Microsoft Power Automate is an incredible tool for automating workflows across different apps and services. One of its standout features is functions (fx) — these let you manipulate data, perform calculations, and control logic within your flows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Power Automate Functions Are a Game-Changer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ Works Everywhere — Use them across Power Automate, Power Apps, and other Microsoft tools for seamless automation.&lt;/p&gt;

&lt;p&gt;✅ Reusable — Write once, use anywhere, cutting down redundancy and saving time.&lt;/p&gt;

&lt;p&gt;✅ Nested Functions — Stack functions inside each other to create more flexible, modular workflows.&lt;/p&gt;

&lt;p&gt;In this guide, we’ll break down some of the most useful Power Automate functions and how they can make your automation smarter and more efficient. Let’s dive in! 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1️⃣ What Are Functions (fx) in Power Automate?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Functions in Power Automate allow users to perform operations on data, including string manipulation, date/time calculations, logical evaluations, and mathematical computations. These functions are similar to Excel formulas and Power Apps expressions.&lt;/p&gt;

&lt;p&gt;Power Automate functions are categorized into different types:&lt;/p&gt;

&lt;p&gt;**- String Functions (e.g., concat(), substring())&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Date and Time Functions (e.g., utcNow(), addDays())&lt;/li&gt;
&lt;li&gt;Logical Functions (e.g., if(), equals())&lt;/li&gt;
&lt;li&gt;Conversion Functions (e.g., int(), float())&lt;/li&gt;
&lt;li&gt;Array Functions (e.g., join(), length())&lt;/li&gt;
&lt;li&gt;Workflow Functions (e.g., coalesce(), base64ToString())**&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2️⃣ String Functions: Manipulating Text in Power Automate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 concat(text1, text2, …) – Combine Multiple Strings&lt;br&gt;
This function joins multiple text values into a single string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;concat('Hello ', 'Power Automate!')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: Hello Power Automate!&lt;/p&gt;

&lt;p&gt;🔹 substring(text, start, length) – Extract Part of a String&lt;br&gt;
Extracts a portion of a string based on the start position and length.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;substring('PowerAutomate', 0, 5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: Power&lt;/p&gt;

&lt;p&gt;🔹 replace(text, oldValue, newValue) – Replace Text in a String&lt;br&gt;
Replaces occurrences of a specified substring within a string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;replace('Welcome to Power Automate', 'Power Automate', 'Flow')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: Welcome to Flow&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3️⃣ Date and Time Functions: Working with Timestamps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 utcNow() – Get the Current UTC Date and Time&lt;/p&gt;

&lt;p&gt;Returns the current timestamp in UTC format.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;utcNow()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output Example: 2024-02-18T10:15:30Z&lt;/p&gt;

&lt;p&gt;🔹 addDays(timestamp, days, format?) – Add Days to a Date&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;addDays(utcNow(), 5, 'yyyy-MM-dd')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output Example: 2024-02-23&lt;/p&gt;

&lt;p&gt;🔹 formatDateTime(timestamp, format) – Format a Date&lt;/p&gt;

&lt;p&gt;Formats a date into a specific format.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;formatDateTime(utcNow(), 'MM/dd/yyyy')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output Example: 02/18/2024&lt;/p&gt;

&lt;p&gt;4️⃣ Logical Functions: Making Decisions in Flows&lt;/p&gt;

&lt;p&gt;🔹 if(condition, valueIfTrue, valueIfFalse) – Conditional Logic&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if(equals(10, 10), 'Match', 'No Match')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: Match&lt;/p&gt;

&lt;p&gt;🔹 equals(value1, value2) – Compare Two Values&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;equals(5, 10)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: false&lt;/p&gt;

&lt;p&gt;🔹 coalesce(value1, value2, …) – Return the First Non-Empty Value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;coalesce('', 'Power Automate', 'Default')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: Power Automate&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5️⃣ Array Functions: Handling Lists and Collections&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 length(array) – Get the Number of Items in an Array&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;length(createArray('A', 'B', 'C'))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: 3&lt;/p&gt;

&lt;p&gt;🔹 join(array, separator) – Convert an Array to a String&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;join(createArray('A', 'B', 'C'), ', ')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: A, B, C&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6️⃣ Conversion Functions: Changing Data Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔹 int(value) – Convert a String to an Integer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int('100')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: 100&lt;/p&gt;

&lt;p&gt;🔹 float(value) – Convert a String to a Decimal Number&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;float('99.99')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: 99.99&lt;/p&gt;

&lt;p&gt;🔹 string(value) – Convert a Value to Text&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;string(2024)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output: '2024'&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test Case&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create Function(fx) in Power Automate Solution to calcualte the last day of the month.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzo5jlpo9r0u4pj97qbfa.png" alt="Creating new Function(fx)" width="717" height="679"&gt;
&lt;/li&gt;
&lt;li&gt;Set parameter, output and Formula.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ct8kiqgsz2lc9u6m8ak.png" alt="Setting Formula(fx)" width="793" height="1164"&gt;
&lt;/li&gt;
&lt;li&gt;Perform an unbound action using dataverse and set parameter
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiicqujygsnc9wh9k57o.png" alt="givenDate set current date ‘2025–02–19T04:13:14.6097779Z’" width="800" height="511"&gt;
&lt;/li&gt;
&lt;li&gt;Test run
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2codibybnbr6530uz3gl.png" alt="Test Output" width="800" height="419"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🚀 Next Steps:&lt;/p&gt;

&lt;p&gt;Try using functions in your flows.&lt;br&gt;
Explore more Power Automate expressions.&lt;br&gt;
Share your experiences in the comments!&lt;br&gt;
Happy automating! 🤖⚡&lt;/p&gt;

</description>
      <category>powerautomate</category>
      <category>powerplatform</category>
      <category>powerapps</category>
      <category>lowcode</category>
    </item>
    <item>
      <title>Avoid Looping Iterations in Power Automate: Use Filter Array for Efficiency</title>
      <dc:creator>Muhammad Yasir</dc:creator>
      <pubDate>Sat, 22 Feb 2025 03:17:06 +0000</pubDate>
      <link>https://dev.to/yasiralkahtani/avoid-looping-iterations-in-power-automate-use-filter-array-for-efficiency-f32</link>
      <guid>https://dev.to/yasiralkahtani/avoid-looping-iterations-in-power-automate-use-filter-array-for-efficiency-f32</guid>
      <description>&lt;p&gt;Power Automate is a powerful tool for automation, but inefficient flows can slow down performance and increase execution time. A common mistake is overusing Apply to Each (looping iterations) when filtering data. Instead, using the Filter Array action can significantly improve your flow’s efficiency.&lt;/p&gt;

&lt;p&gt;Why Avoid Looping in Power Automate?&lt;br&gt;
Using Apply to Each for filtering data:&lt;br&gt;
❌ Slows down execution (loops iterate one-by-one).&lt;br&gt;
❌ Consumes more API calls and runs (impacting Power Automate limits).&lt;br&gt;
❌ Reduces readability and maintainability of your flow.&lt;/p&gt;

&lt;p&gt;Using Filter Array instead:&lt;br&gt;
✅ Executes in a single step (faster execution).&lt;br&gt;
✅ Reduces complexity (no need for loops).&lt;br&gt;
✅ Improves flow performance.&lt;/p&gt;

&lt;p&gt;Example: Filtering Data Without Loops&lt;br&gt;
Let’s say you have an array of employee records, and you want to filter only employees from the “IT Department”.&lt;/p&gt;

&lt;p&gt;Using Apply to Each (Inefficient)&lt;br&gt;
Initialize an empty array variable.&lt;br&gt;
Use Apply to Each to loop through the data.&lt;br&gt;
Add a condition inside the loop (if department = "IT").&lt;br&gt;
Append matching records to the array.&lt;br&gt;
This approach is inefficient because it loops over each item individually.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnluqu5y7kq20jmecmcfy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnluqu5y7kq20jmecmcfy.png" alt="Filtering with loop" width="800" height="971"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using Filter Array (Efficient)&lt;br&gt;
Instead of looping, use the Filter Array action:&lt;/p&gt;

&lt;p&gt;Use the Filter Array action to apply a condition (department is equal to IT).&lt;br&gt;
The action automatically returns only the matching results — no looping required!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F883v39b0ox60pubdyf7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F883v39b0ox60pubdyf7v.png" alt="Filtering data without loop" width="799" height="1153"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From these two cases, it is evident that using a loop takes significantly longer to execute (around 4 seconds) compared to using the Filter Array action (around 2 seconds). Now, imagine implementing this in a larger flow — the time difference would increase dramatically.&lt;/p&gt;

&lt;p&gt;Therefore, it is crucial to consider using Filter Array whenever possible before building a flow. This approach not only improves efficiency but also reduces execution time and resource consumption.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
