# How do I use the requestID (GUID) in setNextRequest() in the pre-request scripts?

**URL:** <https://community.postman.com/t/how-do-i-use-the-requestid-guid-in-setnextrequest-in-the-pre-request-scripts/25216>\
**Category:** Help Hub\
**Tags:** pre-request, setnextrequest, pre-request-script\
**Created:** [June 25, 2021, 6:05pm UTC](https://community.postman.com/t/how-do-i-use-the-requestid-guid-in-setnextrequest-in-the-pre-request-scripts/25216 "2021-06-25T18:05:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![award-bounteous](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@award-bounteous](https://community.postman.com/u/award-bounteous)\
**Post date:** [June 25, 2021, 6:05pm UTC](https://community.postman.com/t/how-do-i-use-the-requestid-guid-in-setnextrequest-in-the-pre-request-scripts/25216/1 "2021-06-25T18:05:33Z")

</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 find the request.

I have tried sending it as not a string, but the pre-request will error.

When I send setNextRequest(“Log Out”) by name, it finds my request and continues on just fine. Using the name is not an option for me. Repeats.

Please help. I’ve googled this a fair bit and nobody shows how to apply it, just how to find the request GUID in the first place. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![taehoshino](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/taehoshino/32/6608_2.png) [@taehoshino](https://community.postman.com/u/taehoshino)\
**Post date:** [July 13, 2021, 11:18pm UTC](https://community.postman.com/t/how-do-i-use-the-requestid-guid-in-setnextrequest-in-the-pre-request-scripts/25216/3 "2021-07-13T23:18:42Z")

</div>

Hey @award-bounteous 👋

Instead of passing the whole request ID, please try only passing “df111f22-11f2-1212-1db2-1b0c21dacaab”.

I hope this helps! 😉

---

<div class="post-metadata">

**Author:** ![award-bounteous](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@award-bounteous](https://community.postman.com/u/award-bounteous)\
**Post date:** [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/4 "2021-08-06T19:05:48Z")

</div>

Thanks! Looks like Postman updated their docs on this too. I bumped into it today while looking for something else:

[https://learning.postman.com/docs/running-collections/building-workflows/](https://learning.postman.com/docs/running-collections/building-workflows/)

 ![Screen Shot 2021-08-06 at 12.04.02 PM](https://us1.discourse-cdn.com/getpostman/original/3X/6/7/67eecb20a65581cb808d56fed818b154641b3d36.png)

Also, beware that the new forks feature will assign a unique GUID to every fork request, as a fork is a copy and that’s how postman deals with copies re: GUIDs for each request. If I find a way to programmatically get GUID, I will update.
