# \#loop

**URL:** https://community.postman.com/tag/loop/163.md

[Latest](https://community.postman.com/latest.md) · [Categories](https://community.postman.com/categories.md) · [Tags](https://community.postman.com/tags.md)

---

## [Loops only executing once](https://community.postman.com/t/loops-only-executing-once/86539)

<div class="topic-metadata">

**Author:** [@andresrv88](https://community.postman.com/u/andresrv88)\
**Replies:** 10\
**Last updated:** [November 10, 2025, 5:33pm UTC](https://community.postman.com/t/loops-only-executing-once/86539 "2025-11-10T17:33:43Z")

</div>

Hi, I’m trying to make an API call to a GET endpoint that returns an array of objects. After that I want to iterate through the array and call an API with PUT method for each object. I tried with the “For” loop but aft…

---

## [For Loop is ending after juts 1 iteration](https://community.postman.com/t/for-loop-is-ending-after-juts-1-iteration/83555)

<div class="topic-metadata">

**Author:** [@technical-saganist-3](https://community.postman.com/u/technical-saganist-3)\
**Replies:** 4\
**Last updated:** [August 14, 2025, 8:04pm UTC](https://community.postman.com/t/for-loop-is-ending-after-juts-1-iteration/83555 "2025-08-14T20:04:53Z")

</div>

Hello. I’ve recently started work with postman flows. I’m not sure why this flow is not working. I’m running a flow that loops through a list of items and sends a POST request for each one. The first iteration works fi…

---

## [I wanna run my loop limited time, but how can I keep beginning startTime while loop updating all the time](https://community.postman.com/t/i-wanna-run-my-loop-limited-time-but-how-can-i-keep-beginning-starttime-while-loop-updating-all-the-time/79198)

<div class="topic-metadata">

**Author:** [@greenridinghood](https://community.postman.com/u/greenridinghood)\
**Replies:** 2\
**Last updated:** [April 25, 2025, 9:08pm UTC](https://community.postman.com/t/i-wanna-run-my-loop-limited-time-but-how-can-i-keep-beginning-starttime-while-loop-updating-all-the-time/79198 "2025-04-25T21:08:47Z")

</div>

Hi Sorry for my title, very hard to explain without code or an example From the beginning, my goal is to run a while loop max 3 minutes while the condition is true. All while loop try crushed, so I did with the if sta…

---

## [How to get all combinations of 2 or more lists to 1 request?](https://community.postman.com/t/how-to-get-all-combinations-of-2-or-more-lists-to-1-request/63864)

<div class="topic-metadata">

**Author:** [@elefantecinza](https://community.postman.com/u/elefantecinza)\
**Replies:** 4\
**Last updated:** [July 9, 2024, 9:22pm UTC](https://community.postman.com/t/how-to-get-all-combinations-of-2-or-more-lists-to-1-request/63864 "2024-07-09T21:22:28Z")

</div>

Lets suppose we have 2 lists and a request that receives 2 variables list1 = \[a, b\] list2 = \[1, 2, 3\] request = { url = localhost:8080 var1 = x var2 = y } How can I send that request using all values combination …

---

## [How to send GET request synchronusly within loop?](https://community.postman.com/t/how-to-send-get-request-synchronusly-within-loop/61506)

<div class="topic-metadata">

**Author:** [@zdenko-s](https://community.postman.com/u/zdenko-s)\
**Replies:** 4\
**Last updated:** [May 28, 2024, 3:42pm UTC](https://community.postman.com/t/how-to-send-get-request-synchronusly-within-loop/61506 "2024-05-28T15:42:00Z")

</div>

I searched community and found answers about synchronous executions but none of them suits my needs. In my case repetition number is unknow, depends on response (or timeout). Chaining and nesting is not solution. I have…

---

## [My Flow with a loop isn't looping](https://community.postman.com/t/my-flow-with-a-loop-isnt-looping/61345)

<div class="topic-metadata">

**Author:** [@atorrenosensei](https://community.postman.com/u/atorrenosensei)\
**Replies:** 5\
**Last updated:** [May 23, 2024, 6:43pm UTC](https://community.postman.com/t/my-flow-with-a-loop-isnt-looping/61345 "2024-05-23T18:43:06Z")

</div>

I have a Flow that roughly looks like this Request A (get X from response) Request B (get Y from response) For Loop on Y Request C (pass X and pass Y) I’m expecting Request C to be called multiple times, because Y has…

---

## [How can I add the loop?](https://community.postman.com/t/how-can-i-add-the-loop/60976)

<div class="topic-metadata">

**Author:** [@docking-module-geol7](https://community.postman.com/u/docking-module-geol7)\
**Replies:** 12\
**Last updated:** [May 17, 2024, 7:14pm UTC](https://community.postman.com/t/how-can-i-add-the-loop/60976 "2024-05-17T19:14:11Z")

</div>

Version - Postman 11 I have one of the request, I wanted to run 10 times.. 1st request /Get - AUthenticate once 2nd Request / Post - I wanted to run 10 times.. CreateOrder - I got the body and Pre scripts as follows …

---

## [How to check if value is null or 0 in flow](https://community.postman.com/t/how-to-check-if-value-is-null-or-0-in-flow/59337)

<div class="topic-metadata">

**Author:** [@legiuffre](https://community.postman.com/u/legiuffre)\
**Replies:** 1\
**Last updated:** [March 28, 2024, 5:28pm UTC](https://community.postman.com/t/how-to-check-if-value-is-null-or-0-in-flow/59337 "2024-03-28T17:28:18Z")

</div>

Hello I am trying to execute some addition in my flow, however, sometimes the numbers I am using come back as ‘.00’ rather than a 0, so I am trying to validate this so the flow does not fail. Example: “CUSTRECORD\_LMA\_…

---

## [Loop stops executing randomly](https://community.postman.com/t/loop-stops-executing-randomly/59018)

<div class="topic-metadata">

**Author:** [@legiuffre](https://community.postman.com/u/legiuffre)\
**Replies:** 4\
**Last updated:** [March 20, 2024, 6:13pm UTC](https://community.postman.com/t/loop-stops-executing-randomly/59018 "2024-03-20T18:13:17Z")

</div>

Hello I am appreciative of all the help from the community so far. I am trying to set up a job to loop through the results of a request and send two requests based on criteria from the original request but it stops exe…

---

## [Loop through limited results](https://community.postman.com/t/loop-through-limited-results/57983)

<div class="topic-metadata">

**Author:** [@research-administra4](https://community.postman.com/u/research-administra4)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 12:11pm UTC](https://community.postman.com/t/loop-through-limited-results/57983 "2024-02-22T12:11:58Z")

</div>

Hi Team, I’m new to post man and have following requirement if anyone can help please - We have total of 50k records and seems like GET API in postman is returning around 5k in one go, so need to know how can we fetc…

---

## [Issue with a loop in flows](https://community.postman.com/t/issue-with-a-loop-in-flows/57852)

<div class="topic-metadata">

**Author:** [@suhi10jr](https://community.postman.com/u/suhi10jr)\
**Replies:** 5\
**Last updated:** [February 21, 2024, 6:47pm UTC](https://community.postman.com/t/issue-with-a-loop-in-flows/57852 "2024-02-21T18:47:24Z")

</div>

Why doesn’t this work? It only loops once and then just ends the flow.

---

## [Flows - send request - repeat request fails silently](https://community.postman.com/t/flows-send-request-repeat-request-fails-silently/53100)

<div class="topic-metadata">

**Author:** [@cbarrydcg](https://community.postman.com/u/cbarrydcg)\
**Replies:** 4\
**Last updated:** [November 7, 2023, 5:41pm UTC](https://community.postman.com/t/flows-send-request-repeat-request-fails-silently/53100 "2023-11-07T17:41:05Z")

</div>

i have a series of requests that i am using ‘flows’ to orchestrate. each request kicks off a job elsewhere, and what i need to do is wait until the job kicked off from the request is complete until i move onto the next …

---

## [How to verify if response contains specific text](https://community.postman.com/t/how-to-verify-if-response-contains-specific-text/50113)

<div class="topic-metadata">

**Author:** [@skyroamofghostviper](https://community.postman.com/u/skyroamofghostviper)\
**Replies:** 6\
**Last updated:** [August 4, 2023, 10:37am UTC](https://community.postman.com/t/how-to-verify-if-response-contains-specific-text/50113 "2023-08-04T10:37:28Z")

</div>

As a response, I have an array returned with lots of email data and I want to verify that the emails returned in the response, are only from specific domains. Not to verify the full emails themselves but only the domain…

---

## [Update List in Flows](https://community.postman.com/t/update-list-in-flows/46852)

<div class="topic-metadata">

**Author:** [@gmayorga](https://community.postman.com/u/gmayorga)\
**Replies:** 0\
**Last updated:** [April 27, 2023, 4:06pm UTC](https://community.postman.com/t/update-list-in-flows/46852 "2023-04-27T16:06:40Z")

</div>

Hello , I’m new in this community and new with Postman-Flows and new with Postman :slight\_smile: I’ve created a Postman-Flow to move the data retrieved by a GET Request from Production environment to my Pre-production …

---

## [Foreach or maybe some other command for a Loop?](https://community.postman.com/t/foreach-or-maybe-some-other-command-for-a-loop/46256)

<div class="topic-metadata">

**Author:** [@brcox9090](https://community.postman.com/u/brcox9090)\
**Replies:** 3\
**Last updated:** [April 12, 2023, 9:01pm UTC](https://community.postman.com/t/foreach-or-maybe-some-other-command-for-a-loop/46256 "2023-04-12T21:01:18Z")

</div>

I am working on an API that will pull folder ID’s and totals from the response data. Essentially, trying to make a loop work to count all of the items in a folder, but it needs to drill down into subfolders to get an acc…

---

## [Searching response for dynamic value based on specific string](https://community.postman.com/t/searching-response-for-dynamic-value-based-on-specific-string/45682)

<div class="topic-metadata">

**Author:** [@meatinaplasticsack](https://community.postman.com/u/meatinaplasticsack)\
**Replies:** 2\
**Last updated:** [March 28, 2023, 1:43pm UTC](https://community.postman.com/t/searching-response-for-dynamic-value-based-on-specific-string/45682 "2023-03-28T13:43:00Z")

</div>

Hello, I have this test case: I need to search response for ID (dynamic value) and store it in variable for reusing it in next request. To find this ID, I need to go through array objects, find specific string/value in …

---

## [Iteration of a specific request in a collection to upload multiple form-data](https://community.postman.com/t/iteration-of-a-specific-request-in-a-collection-to-upload-multiple-form-data/42553)

<div class="topic-metadata">

**Author:** [@meatinaplasticsack](https://community.postman.com/u/meatinaplasticsack)\
**Replies:** 2\
**Last updated:** [January 9, 2023, 9:40am UTC](https://community.postman.com/t/iteration-of-a-specific-request-in-a-collection-to-upload-multiple-form-data/42553 "2023-01-09T09:40:31Z")

</div>

Hello, I have this test case: I need to test uploading bigger file that is split into smaller chunks. I have 3 request in the collection: I request upload URL. It has to be run once. I need to upload all file chunks a…

---

## [Compare two arrays & save the mismatched data in an array](https://community.postman.com/t/compare-two-arrays-save-the-mismatched-data-in-an-array/40780)

<div class="topic-metadata">

**Author:** [@aksh-s-rathod](https://community.postman.com/u/aksh-s-rathod)\
**Replies:** 1\
**Last updated:** [November 4, 2022, 5:13pm UTC](https://community.postman.com/t/compare-two-arrays-save-the-mismatched-data-in-an-array/40780 "2022-11-04T17:13:27Z")

</div>

I need to compare two arrays & get the mismatched data from both into third array. Details: following is the code I used for reference var array1 = \[1, 2, 3, 4, 8, 5, 6, 7\]; var array2 = \[6, 5, 4, 3, 2, 1\] ; var array3…

---

## [Iterating through array until item.x is found, then assign item.y as variable](https://community.postman.com/t/iterating-through-array-until-item-x-is-found-then-assign-item-y-as-variable/36299)

<div class="topic-metadata">

**Author:** [@sgoorkate](https://community.postman.com/u/sgoorkate)\
**Replies:** 0\
**Last updated:** [June 17, 2022, 9:04am UTC](https://community.postman.com/t/iterating-through-array-until-item-x-is-found-then-assign-item-y-as-variable/36299 "2022-06-17T09:04:15Z")

</div>

Hello. I’m trying to write a test that checks if the response of a GET, an array, contains a certain value (a string). The value that it should be looking for comes from a CSV file, because the request is part of a colle…

---

## [How to loop over a GET request in postman API in loop with different dates?](https://community.postman.com/t/how-to-loop-over-a-get-request-in-postman-api-in-loop-with-different-dates/35821)

<div class="topic-metadata">

**Author:** [@supply-administrato5](https://community.postman.com/u/supply-administrato5)\
**Replies:** 1\
**Last updated:** [June 2, 2022, 2:39am UTC](https://community.postman.com/t/how-to-loop-over-a-get-request-in-postman-api-in-loop-with-different-dates/35821 "2022-06-02T02:39:48Z")

</div>

I am new to Postman and API calls, and am starting to read more on pre-request scripts and can’t figure out to loop over a certain data and save the responses to local machine. I have a get request say, GET https://my-u…

---

## [Clearing variables at the end of a Datafile loop](https://community.postman.com/t/clearing-variables-at-the-end-of-a-datafile-loop/34961)

<div class="topic-metadata">

**Author:** [@adam-allford](https://community.postman.com/u/adam-allford)\
**Replies:** 0\
**Last updated:** [May 3, 2022, 10:17am UTC](https://community.postman.com/t/clearing-variables-at-the-end-of-a-datafile-loop/34961 "2022-05-03T10:17:07Z")

</div>

Set-up: I have a collection that uses a Data-file to loop through placing orders for approx. 60 new products (using a productId guid). To set-up this I have to first create two access\_tokens, and a new transactionId, a…

---

## [Loop request with different data not working for params](https://community.postman.com/t/loop-request-with-different-data-not-working-for-params/32154)

<div class="topic-metadata">

**Author:** [@cinges](https://community.postman.com/u/cinges)\
**Replies:** 0\
**Last updated:** [February 2, 2022, 9:26am UTC](https://community.postman.com/t/loop-request-with-different-data-not-working-for-params/32154 "2022-02-02T09:26:45Z")

</div>

Loop request with different data not working for params. I need to remove group from 100 users. If I put username directly to param, its working. If I use {{username}} and json file with users, its not working, I get 40…

---

## [Check value in response if another value is equal to variable](https://community.postman.com/t/check-value-in-response-if-another-value-is-equal-to-variable/30913)

<div class="topic-metadata">

**Author:** [@LiudmylaL](https://community.postman.com/u/LiudmylaL)\
**Replies:** 0\
**Last updated:** [December 21, 2021, 3:56pm UTC](https://community.postman.com/t/check-value-in-response-if-another-value-is-equal-to-variable/30913 "2021-12-21T15:56:14Z")

</div>

I have response in array and need to check that value for “color” = value {{$color}} from environment variable only for that object where “id” = value {{$id}} from environment variable. My response looks like: I n…

---

## [Retrieve parts of a GET response to feed into the next PATCH update body after some formatting](https://community.postman.com/t/retrieve-parts-of-a-get-response-to-feed-into-the-next-patch-update-body-after-some-formatting/23826)

<div class="topic-metadata">

**Author:** [@balexalex](https://community.postman.com/u/balexalex)\
**Replies:** 2\
**Last updated:** [May 17, 2021, 8:29pm UTC](https://community.postman.com/t/retrieve-parts-of-a-get-response-to-feed-into-the-next-patch-update-body-after-some-formatting/23826 "2021-05-17T20:29:40Z")

</div>

Hello, I am newbie. I’m using a GET to request a list of objects. These are just a few of them in the response: { “id”: 437725467, “name”: “Div - 02”, “orig\_id”: null, “proj\_id”: “12345”, “code”: “02” }, { “id…

---

## [Looping Same request for multiple time for uploading file doesn't work on newman and testrunner with .setnextrequest](https://community.postman.com/t/looping-same-request-for-multiple-time-for-uploading-file-doesnt-work-on-newman-and-testrunner-with-setnextrequest/15208)

<div class="topic-metadata">

**Author:** [@gpub1](https://community.postman.com/u/gpub1)\
**Replies:** 5\
**Last updated:** [February 22, 2021, 8:50pm UTC](https://community.postman.com/t/looping-same-request-for-multiple-time-for-uploading-file-doesnt-work-on-newman-and-testrunner-with-setnextrequest/15208 "2021-02-22T20:50:22Z")

</div>

Have simple request POST, how to upload file for different files TC 1- \> Upload with .text file TC 2-\> Upload with .doc file TC 3-\> upload with .docx file TC 4 - \> Upload file with .jpg file TC 5 → Upload file with …

---

## [Call jsonData in loop by passing parameters](https://community.postman.com/t/call-jsondata-in-loop-by-passing-parameters/14196)

<div class="topic-metadata">

**Author:** [@nolan.lacroix1](https://community.postman.com/u/nolan.lacroix1)\
**Replies:** 0\
**Last updated:** [July 16, 2020, 8:43am UTC](https://community.postman.com/t/call-jsondata-in-loop-by-passing-parameters/14196 "2020-07-16T08:43:05Z")

</div>

Hello, I have a problem that I cannot solve, even after several hours of research. I want to pass a hash table. This must be called in a loop, and a test is performed : I check the body variables. The hash table key co…

---

## [Looking for example/tutorial for initializing a database from a JSON file](https://community.postman.com/t/looking-for-example-tutorial-for-initializing-a-database-from-a-json-file/6358)

<div class="topic-metadata">

**Author:** [@app-o-matix](https://community.postman.com/u/app-o-matix)\
**Replies:** 2\
**Last updated:** [July 11, 2019, 9:37pm UTC](https://community.postman.com/t/looking-for-example-tutorial-for-initializing-a-database-from-a-json-file/6358 "2019-07-11T21:37:12Z")

</div>

I’ve built a local node server for interacting with a cloud database and I’m using Postman for the UI. I’m trying to find an example or tutorial that shows how I can loop through a JSON file to initialize the database. T…

---

## [Tests run not stable in collection run loop. (one time run, another time not get into the loop)](https://community.postman.com/t/tests-run-not-stable-in-collection-run-loop-one-time-run-another-time-not-get-into-the-loop/1329)

<div class="topic-metadata">

**Author:** [@o.haistruk](https://community.postman.com/u/o.haistruk)\
**Replies:** 2\
**Last updated:** [April 1, 2018, 6:05pm UTC](https://community.postman.com/t/tests-run-not-stable-in-collection-run-loop-one-time-run-another-time-not-get-into-the-loop/1329 "2018-04-01T18:05:46Z")

</div>

Hi! Can anybody help? I put tests into the for loops and other conditions. And it works fine if I run this single request manually many times. But when I run it as a collection current request can run 1 time and stops …
