cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

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

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 blog

Power Automate Video Tutorials

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

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

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 blog

Power Automate Video Tutorials

View solution in original post

Highlighted
Microsoft
Microsoft

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

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

Highlighted
Microsoft
Microsoft

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

@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 

 

Highlighted
Microsoft
Microsoft

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

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

 

 

 

Highlighted
Super User III
Super User III

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

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 blog

Power Automate Video Tutorials

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (3,189)