# Passing a parameter to two linked requests inside a For loop

**URL:** <https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479>\
**Category:** Help Hub\
**Tags:** variables, postman-flows\
**Created:** [November 4, 2025, 5:58am UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479 "2025-11-04T05:58:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mission-cosmologist4](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mission-cosmologist4](https://community.postman.com/u/mission-cosmologist4)\
**Post date:** [November 4, 2025, 5:58am UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/1 "2025-11-04T05:58:13Z")

</div>

Hi. I have this flow where I loop through projects, list some configuration details, and then update them.

The problem I have is that some of the projects don’t have configurations and return a 403 error. This is fine with me, I just want the loop to go onto the next item.

However, when it isn’t an error and needs to go to the Update call I need to also pass the project id field, so I’ve linked that from the loop. (the highlightes one in the screenshot below)

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/c/f/cf80ca869436fddcb60ab8d9f8fc096ec8c83df2.png)

When I run it with this link it just ends after the first 403 error rather than continuing through all the projects.  
When I remove the id link it works and loops through all the projects, but the updates fail because they don’t have the {{proj{{ parameter.

I’ve tried putting the project id into a variable but it never contains the right value when it gets to the update. I’ve tried putting in IFs and Evaluates to handle the 403 error or force the next value in the loop.

I think the Update call waiting for the variable is stopping the loop going to the next step.  
How can I pass this parameter value to the second call when some of the first calls may fail?  
Is this possible?

Thanks

---

<div class="post-metadata">

**Author:** ![flows-daniel](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/flows-daniel/32/25516_2.png) [@flows-daniel](https://community.postman.com/u/flows-daniel)\
**Post date:** [November 4, 2025, 4:58pm UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/2 "2025-11-04T16:58:22Z")

</div>

Hi @mission-cosmologist4

Welcome to the forums!

You’re on the right track with the if/condition block that’s the easiest solution here. Connect the success and failure ports of the first API call for configurations and check the status code if it’s 403 then do nothing, if it’s not 403 then send the id and execute all your evaluate blocks etc.

Basically your update configurations call has to receive either all of it’s inputs or none for the flow to work as expected. So in the error case it receives nothing and in success it gets all the values.

Let me know if this works for you!

Happy to jump on a call if you’re still running into issues.

---

<div class="post-metadata">

**Author:** ![mission-cosmologist4](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mission-cosmologist4](https://community.postman.com/u/mission-cosmologist4)\
**Post date:** [November 5, 2025, 11:18pm UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/3 "2025-11-05T23:18:17Z")

</div>

Thanks Daniel,

I have the IF statement working, but how do I pass the project\_id from before the IF to the call after it?  
The Project\_id isn’t returned on the GET configurations call, I only have it from the first step of the loop. How can I pass it to the last step of the loop?

Thanks.

---

<div class="post-metadata">

**Author:** ![flows-daniel](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/flows-daniel/32/25516_2.png) [@flows-daniel](https://community.postman.com/u/flows-daniel)\
**Post date:** [November 6, 2025, 2:14am UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/4 "2025-11-06T02:14:09Z")

</div>

Do you have an updated screenshot?

Might be easier to use a condition block as it allows passing through everything defined at the top. After I see your screenshot I can give you more specific advice 🙂

---

<div class="post-metadata">

**Author:** ![mission-cosmologist4](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mission-cosmologist4](https://community.postman.com/u/mission-cosmologist4)\
**Post date:** [November 6, 2025, 2:37am UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/5 "2025-11-06T02:37:43Z")

</div>

![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/1/01b22dd08d709973908dc7d72f5a98a23e95da38.png)  
Basically I still have the same problem. I need to get that id to the parameter in the last call, but bypassing the middle call or IF causes it to stop if there’s a 403.  
Do I need to append the ID to the body so that it’s available to use later?

---

<div class="post-metadata">

**Author:** ![lunar-module-1](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/lunar-module-1/32/26132_2.png) [@lunar-module-1](https://community.postman.com/u/lunar-module-1)\
**Post date:** [November 6, 2025, 2:50am UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/6 "2025-11-06T02:50:37Z")

</div>

create a variable from the id (add a create variable block and connect it to the `id` select), and reference it in the downstream block.

---

<div class="post-metadata">

**Author:** ![flows-daniel](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/flows-daniel/32/25516_2.png) [@flows-daniel](https://community.postman.com/u/flows-daniel)\
**Post date:** [November 6, 2025, 2:51am UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/7 "2025-11-06T02:51:03Z")

</div>

You can use a condition block it works similar to the if block but it passes every name input as a value outside of it so you can pass in your body and the id and then select each after the block if your condition is met.

 ![Screenshot 2025-11-05 at 6.50.35 PM](https://us1.discourse-cdn.com/getpostman/original/3X/e/2/e20787c9cf0a6c3e38a515b861506c308259c2f8.png)

---

<div class="post-metadata">

**Author:** ![mission-cosmologist4](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mission-cosmologist4](https://community.postman.com/u/mission-cosmologist4)\
**Post date:** [November 6, 2025, 11:00pm UTC](https://community.postman.com/t/passing-a-parameter-to-two-linked-requests-inside-a-for-loop/86479/8 "2025-11-06T23:00:57Z")

</div>

The Condition Block did the trick! Thank you!

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/9/f/9f7d87e02db4486beaa6cbb25cfd7ad52b11f5e9.png)

The variable block didn’t work for me, by the time it was calling the second POST call, it had already updated the variable with the next value, so I was getting the wrong value in the POST.
