# Power Automate - Find workflow runs action

**URL:** <https://community.process.st/t/power-automate-find-workflow-runs-action/837>\
**Category:** Advanced Uses\
**Tags:** api\
**Created:** [March 13, 2024, 9:36pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837 "2024-03-13T21:36:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdesilva](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/kdesilva/32/398_2.png) [@kdesilva](https://community.process.st/u/kdesilva)\
**Post date:** [March 13, 2024, 9:36pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/1 "2024-03-13T21:36:59Z")

</div>

Hi everyone, I’m curious about something with the Power Automate integration. Do the “Find workflow runs” action filters work as a logical AND or OR operator? In my testing It seems to be an OR, finding workflow runs even when I have two filters attached.

I’m seeing that in the [API documentation](https://public-api.process.st/api/v1.1/docs/index.html#operation/listWorkflowRuns) it is also an OR, stating:

> “…if there are multiple form field values, then workflows that match any of them will be returned.”

My main question is would there be a way to make it an AND filter? I want it to only find workflow runs based on multiple field properties containing certain text. I’d be ok using the API for this in an HTTP request as well.

---

<div class="post-metadata">

**Author:** ![Tarik](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/tarik/32/147_2.png) [@Tarik](https://community.process.st/u/Tarik)\
**Post date:** [March 14, 2024, 12:34pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/2 "2024-03-14T12:34:17Z")

</div>

Hi @kdesilva

I just want to clarify what you are looking for.  
You want to be able to find a workflow run based on more than one form field value  
ie,  
First Name contains ‘Tarik’  
AND  
Surname contain ‘Ali’

And you would be happy to do this either via the API or through Power Automate?  
If that is the case I can see if this is possible or not.

Thanks  
Tarik

---

<div class="post-metadata">

**Author:** ![kdesilva](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/kdesilva/32/398_2.png) [@kdesilva](https://community.process.st/u/kdesilva)\
**Post date:** [March 14, 2024, 10:32pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/4 "2024-03-14T22:32:36Z")

</div>

Yes, that would work for my use case.

As an addition, I would love to have more control over it. Ability to change contains to equals, not equals, etc.

If it’s not possible with the existing action in Power Automate the API would work perfectly fine.

---

<div class="post-metadata">

**Author:** ![Tarik](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/tarik/32/147_2.png) [@Tarik](https://community.process.st/u/Tarik)\
**Post date:** [March 15, 2024, 4:34pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/5 "2024-03-15T16:34:55Z")

</div>

Can you send me a quick loom video of how you have this setup currently? I know its possible to do this in Zapier, but taking a look at Power Automate first before checking via the API.  
If you would prefer you can email the screen recording directly at tarik@process.st

Thanks  
Tarik

---

<div class="post-metadata">

**Author:** ![Jeff](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/jeff/32/747_2.png) [@Jeff](https://community.process.st/u/Jeff)\
**Post date:** [March 17, 2024, 7:18pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/6 "2024-03-17T19:18:28Z")

</div>

@kdesilva

I just tested our [find workflow runs API call](https://public-api.process.st/api/v1.1/docs/index.html#operation/listWorkflowRuns) (instead of the ‘find workflow runs’ action in our connector) in Power Automate and it is also using an ‘OR’ condition. (IE… it returns workflow runs that match any criteria instead of all search criteria)

---

<div class="post-metadata">

**Author:** ![Jeff](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/jeff/32/747_2.png) [@Jeff](https://community.process.st/u/Jeff)\
**Post date:** [March 17, 2024, 8:14pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/7 "2024-03-17T20:14:18Z")

</div>

Looks like there may be a way around this 😁

If you create a hidden field and populate the default value of the hidden with a series of appended variables (that contain the values from all the form fields in the workflow run you want to search by) you may be able to use a single search (on the hidden field) and avoid the ‘OR’ search issue.

https://www.loom.com/embed/2890dd18a72043538b29ca2ec1a7226c?sid=6a3fa35e-14cc-4c0c-9853-f9666d10676e

---

<div class="post-metadata">

**Author:** ![Tarik](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/tarik/32/147_2.png) [@Tarik](https://community.process.st/u/Tarik)\
**Post date:** [March 18, 2024, 11:33am UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/8 "2024-03-18T11:33:18Z")

</div>

This is a great workaround Jeff thanks for posting it!

---

<div class="post-metadata">

**Author:** ![kdesilva](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.process.st/kdesilva/32/398_2.png) [@kdesilva](https://community.process.st/u/kdesilva)\
**Post date:** [March 18, 2024, 8:28pm UTC](https://community.process.st/t/power-automate-find-workflow-runs-action/837/9 "2024-03-18T20:28:38Z")

</div>

This is exactly what I ended up doing for my client. Would love to see the functionality built into the API though!

I can still send the old setup to you @Tarik if needed.
