# How to use If blocks in Flows

**URL:** <https://community.postman.com/t/how-to-use-if-blocks-in-flows/56463>\
**Category:** Help Hub\
**Tags:** postman-flows, if-block\
**Created:** [January 11, 2024, 1:23pm UTC](https://community.postman.com/t/how-to-use-if-blocks-in-flows/56463 "2024-01-11T13:23:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nategerman](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nategerman](https://community.postman.com/u/nategerman)\
**Post date:** [January 11, 2024, 1:23pm UTC](https://community.postman.com/t/how-to-use-if-blocks-in-flows/56463/1 "2024-01-11T13:23:52Z")

</div>

I am attempting to move forward with a flow if a value in the response equals “Archived”. The strings exactly match, but it always returns to the else condition. What am I missing?

![Screenshot 2024-01-11 at 8.23.29 AM](https://us1.discourse-cdn.com/getpostman/original/3X/2/2/2232c8509da2f7b00f65103f7a0e0c1c44178e6a.png)

---

<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 11, 2024, 5:24pm UTC](https://community.postman.com/t/how-to-use-if-blocks-in-flows/56463/2 "2024-01-11T17:24:17Z")

</div>

Hi @nategerman

The `Data.Other.PhaseName` has to be declared as an input at the top variable first. The `Data` port is what will be sent in the then/else condition.

Try this:

 ![Screenshot 2024-01-11 at 9.22.55 AM](https://us1.discourse-cdn.com/getpostman/original/3X/a/c/ac1f9b2be5b117b5fb875716e2a8ba4c1bb4eda8.png)

---

<div class="post-metadata">

**Author:** ![nategerman](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nategerman](https://community.postman.com/u/nategerman)\
**Post date:** [January 11, 2024, 7:18pm UTC](https://community.postman.com/t/how-to-use-if-blocks-in-flows/56463/3 "2024-01-11T19:18:22Z")

</div>

Thank you. I thought that the Data in the bottom left was already a variable that I could call. I wasn’t able to get it to work exactly as you did though. I had to remove the Data from inside the variable path select in order for it to function correctly.

Like this:  
 ![Screenshot 2024-01-11 at 2.18.03 PM](https://us1.discourse-cdn.com/getpostman/original/3X/6/1/61516834c503311d1688868070f1165de780f2ff.png)

---

<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:** [January 14, 2024, 7:18pm UTC](https://community.postman.com/t/how-to-use-if-blocks-in-flows/56463/4 "2024-01-14T19:18:32Z")

</div>

Closed on January 14, 2024, 7:18pm UTC

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