cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jasmine2020
Microsoft
Microsoft

Query CosmosDB, return value, if value matches, send value to CRM, if not send email

I have built a flow that I would like to:

 

 

Query CosmosDB and return a value, if the the output value matches, send this value to CRM, if not send an email. 

 

This is what I have done so far:

 

jasmine2020_5-1596734209867.png

 

jasmine2020_2-1596734058412.png

 

 

**Does this conditional look correct for what I am doing?**

 

jasmine2020_0-1596739450849.png

 

 

 

 

jasmine2020_4-1596734105894.png

 

 

I am not sure if the inputs are correct here.

Any guidance will be helpful.

 

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @jasmine2020 

 

Couple of things to debug this.

 

1. Check your run history and see what it returns from the CosmosDB query step. Then check the condition value you are setting correctly (true expression or not).

 

2. I can see you are mapping Feature Category mapped with current item. Looks like that is not correct. Add a compose step above the CDS step and map the current item under the compose. Check the run history values and see what it returned under the compose action step. Then modify the below step accordingly. 

 

If you still struggling post a screenshot of your flow run history. 

 

 

Thanks 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

5 REPLIES 5
abm
Super User
Super User

Hi @jasmine2020 

 

Couple of things to debug this.

 

1. Check your run history and see what it returns from the CosmosDB query step. Then check the condition value you are setting correctly (true expression or not).

 

2. I can see you are mapping Feature Category mapped with current item. Looks like that is not correct. Add a compose step above the CDS step and map the current item under the compose. Check the run history values and see what it returned under the compose action step. Then modify the below step accordingly. 

 

If you still struggling post a screenshot of your flow run history. 

 

 

Thanks 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

Great tips @abm Thank you. I am trying this now

@abm  Could you clarify what this is saying?

 

 

 

 

jasmine2020_0-1596772361465.png

jasmine2020_1-1596772408669.png

 

 

My understanding is that it is saying: If the array output of the above query is true, then do this:

 

 

Then I have my true/false conditionals.

 

 

Any help is appreciated. Thanks 

 

Hi @abm 

 

I am thinking this conditional may be correct? but not sure?

 

I wish to:

"iterate over each array element, match a specific value", this is essentially this step right?:

 

jasmine2020_0-1596779170070.png

 

 

Because I am iterating over the array of elements that I just queried, and then if it equals the value I want (Query output of documents) then do.......xyz.....

 

 

This is my understanding, but I am not 100% sure..

Any suggestion is helpful.

 

 

jasmine2020_1-1596779170098.png

 

 

 

Hi @jasmine2020 

 

What happens when you run this flow? Without seeing your run history data its difficult to give you an exact answer.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,783)