# \#setnextrequest

**URL:** https://community.postman.com/tag/setnextrequest/57.md

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

---

## [Issues with pm.execution.setNextRequest() inside the manual collection runner](https://community.postman.com/t/issues-with-pm-execution-setnextrequest-inside-the-manual-collection-runner/87668)

<div class="topic-metadata">

**Author:** [@romeatcareqb](https://community.postman.com/u/romeatcareqb)\
**Replies:** 0\
**Last updated:** [December 24, 2025, 1:47am UTC](https://community.postman.com/t/issues-with-pm-execution-setnextrequest-inside-the-manual-collection-runner/87668 "2025-12-24T01:47:26Z")

</div>

I am trying to use some conditional routing to skip a request in a collection based on whether certain variables are present earlier in the sequence. In the post-request script, we check for the presence of the variable,…

---

## [setNextRequest example does not work](https://community.postman.com/t/setnextrequest-example-does-not-work/80283)

<div class="topic-metadata">

**Author:** [@spacecraft-physici16](https://community.postman.com/u/spacecraft-physici16)\
**Replies:** 3\
**Last updated:** [May 23, 2025, 4:15pm UTC](https://community.postman.com/t/setnextrequest-example-does-not-work/80283 "2025-05-23T16:15:35Z")

</div>

Hello, I’ve been trying to get pm.execution.setNextRequest to work as documented, but so far I haven’t been successful—even when using the example provided in your own documentation: To isolate the issue, I created a …

---

## [Postman collection keeps running despite setNextRequest](https://community.postman.com/t/postman-collection-keeps-running-despite-setnextrequest/80286)

<div class="topic-metadata">

**Author:** [@keegs53](https://community.postman.com/u/keegs53)\
**Replies:** 4\
**Last updated:** [May 22, 2025, 12:50pm UTC](https://community.postman.com/t/postman-collection-keeps-running-despite-setnextrequest/80286 "2025-05-22T12:50:22Z")

</div>

I’ve been pouring through google and and the documenation for days but I can’t get this to work. This is my most simple example. In my Post-response block I have only these lines: console.log(“CALLING pm.execution.setN…

---

## [setNextRequest() after skipRequest() in pre-script does not go to that request, but stops execution](https://community.postman.com/t/setnextrequest-after-skiprequest-in-pre-script-does-not-go-to-that-request-but-stops-execution/73709)

<div class="topic-metadata">

**Author:** [@ariew](https://community.postman.com/u/ariew)\
**Replies:** 7\
**Last updated:** [January 16, 2025, 12:25pm UTC](https://community.postman.com/t/setnextrequest-after-skiprequest-in-pre-script-does-not-go-to-that-request-but-stops-execution/73709 "2025-01-16T12:25:33Z")

</div>

Under certain conditions I want to skip current request and continue with other requests. That other request might be the same request (with other parameters made in the pre-script) or another request. When the conditi…

---

## [pm.execution.setNextRequest not works in api test](https://community.postman.com/t/pm-execution-setnextrequest-not-works-in-api-test/70917)

<div class="topic-metadata">

**Author:** [@airanedition](https://community.postman.com/u/airanedition)\
**Replies:** 2\
**Last updated:** [November 7, 2024, 10:28am UTC](https://community.postman.com/t/pm-execution-setnextrequest-not-works-in-api-test/70917 "2024-11-07T10:28:03Z")

</div>

Good afternoon, I have a collection in Postman of 4 methods: Add, Get, Update, Remove, having specified Request in all methods, the last condition was to specify pm.execution.setNextRequest(“Get Place”) in Remove, so tha…

---

## [Re-send the same request not working](https://community.postman.com/t/re-send-the-same-request-not-working/69829)

<div class="topic-metadata">

**Author:** [@koustubh24](https://community.postman.com/u/koustubh24)\
**Replies:** 2\
**Last updated:** [October 18, 2024, 3:19am UTC](https://community.postman.com/t/re-send-the-same-request-not-working/69829 "2024-10-18T03:19:44Z")

</div>

Hello experts !, I’m trying to mimic a scenario where the end-user accidentally clicks the button twice & request is sent twice !! try to achieve: sending the same request again after checking the response code. proble…

---

## [setNextRequest is undefined?](https://community.postman.com/t/setnextrequest-is-undefined/67817)

<div class="topic-metadata">

**Author:** [@aviation-observer-43](https://community.postman.com/u/aviation-observer-43)\
**Replies:** 1\
**Last updated:** [September 2, 2024, 8:42am UTC](https://community.postman.com/t/setnextrequest-is-undefined/67817 "2024-09-02T08:42:43Z")

</div>

There is a strange issue I’m getting when running a collection using newman. This one request has a retry mechanism in its post-script if (response.id == null) { let retryCounter = pm.environment.get("retryCounter"…

---

## [Deprecated warning in the Postman Console](https://community.postman.com/t/deprecated-warning-in-the-postman-console/64476)

<div class="topic-metadata">

**Author:** [@osiuser](https://community.postman.com/u/osiuser)\
**Replies:** 8\
**Last updated:** [July 23, 2024, 4:36pm UTC](https://community.postman.com/t/deprecated-warning-in-the-postman-console/64476 "2024-07-23T16:36:19Z")

</div>

I’m starting getting the Warning in the Console “Using “postman.setNextRequest” is deprecated. Use “pm.execution.setNextRequest()” instead.” But it doesn’t look like I use postman.setNextRequest command in Scripts cod…

---

## [Execute first request from collection only once](https://community.postman.com/t/execute-first-request-from-collection-only-once/62035)

<div class="topic-metadata">

**Author:** [@descent-module-admi2](https://community.postman.com/u/descent-module-admi2)\
**Replies:** 2\
**Last updated:** [June 11, 2024, 6:39am UTC](https://community.postman.com/t/execute-first-request-from-collection-only-once/62035 "2024-06-11T06:39:43Z")

</div>

Hello, I created a collection form 5 POST request. The first request is for getting token and I want to execute the request only once on first iteration. After that to start from the second. For example : iteration 1 → …

---

## [pm.execution.setNextRequest is not a function CLI error](https://community.postman.com/t/pm-execution-setnextrequest-is-not-a-function-cli-error/59974)

<div class="topic-metadata">

**Author:** [@descent-module-part1](https://community.postman.com/u/descent-module-part1)\
**Replies:** 2\
**Last updated:** [May 23, 2024, 8:51am UTC](https://community.postman.com/t/pm-execution-setnextrequest-is-not-a-function-cli-error/59974 "2024-05-23T08:51:46Z")

</div>

Last week, in the monitor console logs, I started seeing the warning “Using “postman.setNextRequest” is deprecated. Use “pm.execution.setNextRequest()” instead.” When running the tests through the monitors there are n…

---

## [Updating the request URL after the initial call](https://community.postman.com/t/updating-the-request-url-after-the-initial-call/57911)

<div class="topic-metadata">

**Author:** [@oakpost0](https://community.postman.com/u/oakpost0)\
**Replies:** 1\
**Last updated:** [February 21, 2024, 11:34am UTC](https://community.postman.com/t/updating-the-request-url-after-the-initial-call/57911 "2024-02-21T11:34:41Z")

</div>

I work with a few APIs that paginate large responses (100+). To obtain the next set of responses, the API returns a link via headers which you’re then supposed to query. I got tired of manually finding the link in heade…

---

## [setNextRequest() doesn't work](https://community.postman.com/t/setnextrequest-doesnt-work/17506)

<div class="topic-metadata">

**Author:** [@oasis](https://community.postman.com/u/oasis)\
**Replies:** 15\
**Last updated:** [November 1, 2023, 7:41pm UTC](https://community.postman.com/t/setnextrequest-doesnt-work/17506 "2023-11-01T19:41:29Z")

</div>

I have the below tests shown in the ‘with default values’ folder. The first test is an initializer. The next 4 tests are unique and last two are common. Each unique test should call the common requests one after another…

---

## [setNextRequest is not working in Collection](https://community.postman.com/t/setnextrequest-is-not-working-in-collection/51784)

<div class="topic-metadata">

**Author:** [@deep-pm](https://community.postman.com/u/deep-pm)\
**Replies:** 11\
**Last updated:** [September 20, 2023, 5:09pm UTC](https://community.postman.com/t/setnextrequest-is-not-working-in-collection/51784 "2023-09-20T17:09:27Z")

</div>

I have one get call which gives me record id and status, which I am storing in a collection variable. I am using that id and status one by one using shift function. Based on the record status I have added the condtional…

---

## [Running a request multiple times with different data sets](https://community.postman.com/t/running-a-request-multiple-times-with-different-data-sets/1064)

<div class="topic-metadata">

**Author:** [@ricardorio28](https://community.postman.com/u/ricardorio28)\
**Replies:** 16\
**Last updated:** [August 2, 2023, 8:56am UTC](https://community.postman.com/t/running-a-request-multiple-times-with-different-data-sets/1064 "2023-08-02T08:56:29Z")

</div>

Hi, I am trying make a request and call multiple times with different data but runs only one time. In a GET request i have the URL {{url}}/dev/users/isUserNameAvailable?username={{username}} Then in Pre-request Scr…

---

## [Sending new test data in body of each new setNextRequest iteration](https://community.postman.com/t/sending-new-test-data-in-body-of-each-new-setnextrequest-iteration/22842)

<div class="topic-metadata">

**Author:** [@rdzanan](https://community.postman.com/u/rdzanan)\
**Replies:** 3\
**Last updated:** [May 26, 2023, 9:46am UTC](https://community.postman.com/t/sending-new-test-data-in-body-of-each-new-setnextrequest-iteration/22842 "2023-05-26T09:46:00Z")

</div>

Hey guys I have searched all over the forum but wasnt able to find the solution. Basically I use random method to generate name in one of my requests which repeats multiple times in collection. Issue is when I run the se…

---

## [Unable to .setNextRequest to work](https://community.postman.com/t/unable-to-setnextrequest-to-work/47161)

<div class="topic-metadata">

**Author:** [@altimetry-administ10](https://community.postman.com/u/altimetry-administ10)\
**Replies:** 2\
**Last updated:** [May 9, 2023, 5:51am UTC](https://community.postman.com/t/unable-to-setnextrequest-to-work/47161 "2023-05-09T05:51:19Z")

</div>

I have folder 1 in my collection with some requests, say R1, R2, R3, R4, and R5. I want to be able to run R1\>R4\>R2\>R4\>R3\>R4\>R5. What is the best approach to this? I tried many things in the collection runner, but nothing…

---

## [Unable to run a API multiple times using setNextRequest](https://community.postman.com/t/unable-to-run-a-api-multiple-times-using-setnextrequest/43864)

<div class="topic-metadata">

**Author:** [@nadeemciit102](https://community.postman.com/u/nadeemciit102)\
**Replies:** 2\
**Last updated:** [February 14, 2023, 12:31pm UTC](https://community.postman.com/t/unable-to-run-a-api-multiple-times-using-setnextrequest/43864 "2023-02-14T12:31:22Z")

</div>

I have simple three get APIs. testApi, testApi2 and testApi3 I just want to run 3rd API three times right after the first. Here is the test script: var i = 0; while (i\<3) { i++; console.log(i); postman.setNextReque…

---

## [Chaining Multiple Requests together](https://community.postman.com/t/chaining-multiple-requests-together/19306)

<div class="topic-metadata">

**Author:** [@mark.sadegursky](https://community.postman.com/u/mark.sadegursky)\
**Replies:** 3\
**Last updated:** [February 6, 2023, 11:26am UTC](https://community.postman.com/t/chaining-multiple-requests-together/19306 "2023-02-06T11:26:44Z")

</div>

Hi Is it possible to chain multiple requests? Loop 1 → Get List of Channels Loop on results from Loop 1 Call Get List of Channels Messages for each ID in Loop 1 Loop on results from Loop 2 call Delete Channels Mess…

---

## [How to use two setNextRequest under same pre-request-scripts](https://community.postman.com/t/how-to-use-two-setnextrequest-under-same-pre-request-scripts/42999)

<div class="topic-metadata">

**Author:** [@anilkgk](https://community.postman.com/u/anilkgk)\
**Replies:** 9\
**Last updated:** [January 19, 2023, 12:07pm UTC](https://community.postman.com/t/how-to-use-two-setnextrequest-under-same-pre-request-scripts/42999 "2023-01-19T12:07:45Z")

</div>

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic. Here’s an outline with best practices for making your…

---

## [Delay and retry between the execution of 2 requests](https://community.postman.com/t/delay-and-retry-between-the-execution-of-2-requests/39649)

<div class="topic-metadata">

**Author:** [@oneappuser](https://community.postman.com/u/oneappuser)\
**Replies:** 4\
**Last updated:** [October 11, 2022, 11:00am UTC](https://community.postman.com/t/delay-and-retry-between-the-execution-of-2-requests/39649 "2022-10-11T11:00:38Z")

</div>

Hi, I want to put some delay and retry between the execution of 2 requests until i get the completed status of an order in the 1st request(Get\_Product\_Order). Here using below code, i am getting the timeout for 3secs b…

---

## [setNextRequest is running my request on loop but using only the 1st row of testdata file](https://community.postman.com/t/setnextrequest-is-running-my-request-on-loop-but-using-only-the-1st-row-of-testdata-file/38793)

<div class="topic-metadata">

**Author:** [@oneappuser](https://community.postman.com/u/oneappuser)\
**Replies:** 5\
**Last updated:** [September 13, 2022, 9:11am UTC](https://community.postman.com/t/setnextrequest-is-running-my-request-on-loop-but-using-only-the-1st-row-of-testdata-file/38793 "2022-09-13T09:11:47Z")

</div>

Hello Everyone, I have gone through several post and discussion, but couldn’t get solution for my issue. My issue: I have 5 request API where i have to run 4 request onetime only and the 5th API needs to be run 12 iter…

---

## [Need help in looping service](https://community.postman.com/t/need-help-in-looping-service/38551)

<div class="topic-metadata">

**Author:** [@oneappuser](https://community.postman.com/u/oneappuser)\
**Replies:** 0\
**Last updated:** [August 25, 2022, 12:16pm UTC](https://community.postman.com/t/need-help-in-looping-service/38551 "2022-08-25T12:16:26Z")

</div>

Hello, I have a requirement like- there are 4 APIs in a collection, where 3 APIs will get call once and the 4th API will be called repeatedly as it is having 9 rows of records. 1- Access Token 2- Transaction Token 3-…

---

## [setNextRequest - won't stop on null](https://community.postman.com/t/setnextrequest-wont-stop-on-null/38391)

<div class="topic-metadata">

**Author:** [@daniel.sessions](https://community.postman.com/u/daniel.sessions)\
**Replies:** 0\
**Last updated:** [August 21, 2022, 4:03pm UTC](https://community.postman.com/t/setnextrequest-wont-stop-on-null/38391 "2022-08-21T16:03:13Z")

</div>

Hello I run a collection that uses postman.setNextRequest() in a pre-req script to set the page id param value on my next request. This works fine until the last request in the collection where the if…else statement sho…

---

## [How do I use the requestID (GUID) in setNextRequest() in the pre-request scripts?](https://community.postman.com/t/how-do-i-use-the-requestid-guid-in-setnextrequest-in-the-pre-request-scripts/25216)

<div class="topic-metadata">

**Author:** [@award-bounteous](https://community.postman.com/u/award-bounteous)\
**Replies:** 2\
**Last updated:** [August 6, 2021, 7:05pm UTC](https://community.postman.com/t/how-do-i-use-the-requestid-guid-in-setnextrequest-in-the-pre-request-scripts/25216 "2021-08-06T19:05:48Z")

</div>

I have a specific request’s GUID that I’d like to use in setNextRequest(). When I send setNextRequest("1212121-df111f22-11f2-1212-1db2-1b0c21dacaab") (but like, the real one), it does not function. Postman runner cannot…

---

## [Collection Runner continues to iterate even when postman.setNextRequest(null)](https://community.postman.com/t/collection-runner-continues-to-iterate-even-when-postman-setnextrequest-null/33092)

<div class="topic-metadata">

**Author:** [@6thSen](https://community.postman.com/u/6thSen)\
**Replies:** 0\
**Last updated:** [March 2, 2022, 2:25pm UTC](https://community.postman.com/t/collection-runner-continues-to-iterate-even-when-postman-setnextrequest-null/33092 "2022-03-02T14:25:40Z")

</div>

How do I make the collection runner stop iterating based on the response code I received? I’m already using postman.setNextRequest(null) but the iteration still continues. I’m trying to stop the iteration if the script …

---

## [Modify Iteration value while looping over csv for single API in collection](https://community.postman.com/t/modify-iteration-value-while-looping-over-csv-for-single-api-in-collection/30345)

<div class="topic-metadata">

**Author:** [@spacecraft-speciali3](https://community.postman.com/u/spacecraft-speciali3)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 2:33pm UTC](https://community.postman.com/t/modify-iteration-value-while-looping-over-csv-for-single-api-in-collection/30345 "2021-12-09T14:33:58Z")

</div>

Team - Requirement: Collection:- Post1(Login) → Post2(some task) → Post3(logout) Here Post2 is some task which is supposed to loop over external csv data file. I am able to run Collection wherein every API call is m…

---

## [Chaining APIs, but running some of them in a loop](https://community.postman.com/t/chaining-apis-but-running-some-of-them-in-a-loop/25520)

<div class="topic-metadata">

**Author:** [@ontherocks](https://community.postman.com/u/ontherocks)\
**Replies:** 4\
**Last updated:** [July 8, 2021, 4:42am UTC](https://community.postman.com/t/chaining-apis-but-running-some-of-them-in-a-loop/25520 "2021-07-08T04:42:42Z")

</div>

I have 3 APIs. API#1 - GET {{endPoint}}/event/{{customerId}}/orders API#2 - POST {{endPoint}}/pullOrders/{{orderId}}/claims API#3 - DELETE {{endPoint}}/pullOrders/{{orderId}}/events Response of API#1 is a json with t…

---

## [setNextRequest() not working as expected, using latest Postman v8.0.6](https://community.postman.com/t/setnextrequest-not-working-as-expected-using-latest-postman-v8-0-6/20778)

<div class="topic-metadata">

**Author:** [@kalpeshc09](https://community.postman.com/u/kalpeshc09)\
**Replies:** 3\
**Last updated:** [February 25, 2021, 1:38pm UTC](https://community.postman.com/t/setnextrequest-not-working-as-expected-using-latest-postman-v8-0-6/20778 "2021-02-25T13:38:20Z")

</div>

I am trying to trigger a request run based on the condition in the Test section. Running all these already in collection runner but still, setNextRequest() is not working as expected. Scenario 1: If myVar is greater th…

---

## [postman.SetNextRequest is not a function](https://community.postman.com/t/postman-setnextrequest-is-not-a-function/16579)

<div class="topic-metadata">

**Author:** [@Coxjeffrey](https://community.postman.com/u/Coxjeffrey)\
**Replies:** 3\
**Last updated:** [October 8, 2020, 5:59pm UTC](https://community.postman.com/t/postman-setnextrequest-is-not-a-function/16579 "2020-10-08T17:59:43Z")

</div>

I’m trying to run a request if an variable’s condition is good. When I run this in the postman runner I get the error that postman.SetNextRequest is not a function? I’m on v6.7.4 of Postman. My Code: if (postman.getE…

---

## [postman.setNextRequest FT Headlines](https://community.postman.com/t/postman-setnextrequest-ft-headlines/14299)

<div class="topic-metadata">

**Author:** [@douglasmirandas](https://community.postman.com/u/douglasmirandas)\
**Replies:** 0\
**Last updated:** [July 20, 2020, 11:11am UTC](https://community.postman.com/t/postman-setnextrequest-ft-headlines/14299 "2020-07-20T11:11:11Z")

</div>

Please I am working on FT news headlines. The request only allows me to get a maximum of 100 headlines in each transaction but I need the historical data. I tried to build a postman.setNextRequest but it did not work. M…

[Next page](https://community.postman.com/tag/setnextrequest/57.md?match_all_tags=true&page=1&tags%5B%5D=setnextrequest)
