Query SharePoint List From Microsoft Flow

Traditionally, Microsoft SharePoint list data is filtered using CAML query. But when querying the same SharePoint list data from Microsoft flow, CAML query will not work because Microsoft flow was built on top of Logic apps. So, to query the SharePoint list data in Microsoft Flow, OData filter expressions need to be used instead of CAML query.



It took me a while to find the right expression to make my query pull the right data. In the below table, I have summarized the most frequently used ones.

DefinitionOData URICAML
AndandAnd
OrorOr
Less thanltLt
Greater thangtGt
Greater than or equal togeGeq
Less than or equal toleLeq
Not EqualneNeq
StartswithStartswithBeginsWith

The following use cases are implemented using OData URI in Microsoft flow.
  • Get list items based on condition.

  • Pick approver level based on the value (i.e., £1000-£25000: Level 1 Approver, £25001-£50000 Level 2 Approver, £50001-£100000 Level 3 Approver).


I hope this quick tip will save some developers' precious time and get cracking wit the flow. Drop a comment if you need any help.