# postman.sendRequest like postman.setNextRequest()

**URL:** <https://community.postman.com/t/postman-sendrequest-like-postman-setnextrequest/24115>\
**Category:** Help Hub\
**Created:** [May 26, 2021, 11:31am UTC](https://community.postman.com/t/postman-sendrequest-like-postman-setnextrequest/24115 "2021-05-26T11:31:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GerardVanEngelen](https://avatars.discourse-cdn.com/v4/letter/g/977dab/32.png) [@GerardVanEngelen](https://community.postman.com/u/GerardVanEngelen)\
**Post date:** [May 26, 2021, 11:31am UTC](https://community.postman.com/t/postman-sendrequest-like-postman-setnextrequest/24115/1 "2021-05-26T11:31:10Z")

</div>

_My question_:  
I’m doing request which require some login beforehand. I was using postman.setNextRequest(“name of authentication request”) to do this and it works like a charm when you do requests with the PM interface. But when you try to run it as a collection it runs only one test, this is because setNextRequest() overwrites the playlist created by the collection runner.  
So I would like to do it with sendRequest() but that does not work with the request name reference it requires you to write out the request.

Is there a way to do the same as setNextRequest() but then without messing up my test playlist?
