Showing results for 
Search instead for 
Did you mean: 

Query cosmosDB, extract matching items, if items do not match, send email

I am setting up this LogicApp and want to see if my approach is correct:



I wish to push data from CosmosDB into CRM, and then return these items back to CosmosDB and replace its ID. Not all of the push to CRM is direct due to some of CRMs fields consisting of 'lookup fields'. I have a list of the GUIDs for the lookup fields, but not every record has a match. For the records that do not have a match, I wish to send an email. This is my flow so far:









I am unsure of my highlighted fields here. Is this the correct approach?

Any suggestion or advice is appreciated

Community Support
Community Support

Hi @jasmine2020,


The "Array of ..." seems like an array, the "Document" is an Object, so the comparison not correct.

If you want to compare two fields, you should make sure the two fields are same type. If you want to confirm an array contains a string, use "Contains" condition will be correct choice.

Annotation 2020-08-28 095124.jpg


Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,567)