# Postman Flow: Filtering and chaining further

**URL:** <https://community.postman.com/t/postman-flow-filtering-and-chaining-further/56155>\
**Category:** Help Hub\
**Tags:** tests, postman-flows\
**Created:** [January 3, 2024, 5:30pm UTC](https://community.postman.com/t/postman-flow-filtering-and-chaining-further/56155 "2024-01-03T17:30:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![punbijay](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/punbijay/32/27729_2.png) [@punbijay](https://community.postman.com/u/punbijay)\
**Post date:** [January 3, 2024, 5:30pm UTC](https://community.postman.com/t/postman-flow-filtering-and-chaining-further/56155/1 "2024-01-03T17:30:30Z")

</div>

Hi Team,

Can someone help to show an example or share thoughts on how to proceed with below process?

1. POST Authorisation request
2. Returns the response with ID and others
3. With that ID
4. GET call to /consents, This will return in collection of object for that x user or any  
 ![Screenshot 2024-01-03 at 17.25.21](https://us1.discourse-cdn.com/getpostman/original/3X/b/8/b84aa7f0a5b19f2b1805e5ad1e3646cbc75dda30.png)
5. Within that returned, I would like to filter with that ID which is returned from step 1
6. Then using that next call to GET /consent to get that specific call
7. From there check if !Authorised \> Stop there with log else move with the flow and display more details

Can someone help me or share thought or a process to achieve 5,6 and 7?

Thanks for your help on advance

---

<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:** [January 3, 2024, 10:53pm UTC](https://community.postman.com/t/postman-flow-filtering-and-chaining-further/56155/2 "2024-01-03T22:53:38Z")

</div>

Hi @punbijay

Depending on how your data is structured, you can use an FQL function to filter for the ID in step 5 ( [example1](https://learning.postman.com/docs/postman-flows/flows-query-language/conditional-data-selection/#filter-query-results-for-objects-with-specific-key-value-pairs) [example2](https://learning.postman.com/docs/postman-flows/flows-query-language/data-manipulation/#filter-for-values)). This can be done in the Evaluate Block.

Step 6 will take the output of the block and use that value to GET /consent

Step 7 you can use an If Block to accomplish this.

The general flow should look something like this:

 ![Screenshot 2024-01-03 at 2.49.21 PM](https://us1.discourse-cdn.com/getpostman/original/3X/f/5/f58df31dd6afa669ef0fd753cdd444fcd7102a58.png)

Happy to help with writing the FQL function if you wouldn’t mind giving me the structure of the the data returned.

---

<div class="post-metadata">

**Author:** ![punbijay](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/punbijay/32/27729_2.png) [@punbijay](https://community.postman.com/u/punbijay)\
**Post date:** [January 4, 2024, 7:17pm UTC](https://community.postman.com/t/postman-flow-filtering-and-chaining-further/56155/3 "2024-01-04T19:17:58Z")

</div>

Hello @flows-daniel ,

Thank yoi very much for your expertise insight was really helpful.

And thank you for offering helping hands on FQL query but i have managed to get it through that said, the link you provided was very useful.

I have now managed to get through the process, although i have one question with regard with my current journey, i.e.

1. Api URL, baseurl/endpoint/:parameter

Is passing parameter possible via flow process?  
I made a successful call if i pass it as baseurl/endpoint?id=value but with parameters i am not able to pass in values in parameter into the URL.

I tried setting up a environment variable but still didnot worked.

Thank you for your expertise insight in advance

---

<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:** [January 4, 2024, 7:55pm UTC](https://community.postman.com/t/postman-flow-filtering-and-chaining-further/56155/4 "2024-01-04T19:55:04Z")

</div>

Hi @punbijay

It is possible to pass in a parameter. In your url you can have `{{url}}/consent/{{id}}` where the url can be supplied from the environment and the `id` will be supplied in the flow.

Your request will look like this and can be passed in via the flow itself:

 ![Screenshot 2024-01-04 at 11.52.58 AM](https://us1.discourse-cdn.com/getpostman/original/3X/7/1/71e168e6e408542926dc3a9544dec9221d26edb6.png)

Hitting the plus button on a variable brings up a list and you can choose a `select` block. Using this without any path specified selects the value returned from the previous block (in this case the `id`).

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [February 3, 2024, 7:55pm UTC](https://community.postman.com/t/postman-flow-filtering-and-chaining-further/56155/5 "2024-02-03T19:55:17Z")

</div>

Closed on February 3, 2024, 7:55pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
