SharePoint Online - Query a list

Use the SharePoint Online - Query a list action A tool for building the processes, logic, and direction within workflows. to query a list of items within a specified SharePoint Online site. You can add conditions to limit the returned query results.

For example, you can use this action to automate a reimbursement process. The accounts team may look for employees who have raised reimbursement requests. You can also set conditions to query employees from a location or team.

For more information on SharePoint Online and its other start events and actions, see SharePoint Online.

Configure the SharePoint Online - Query a list action

See the SharePoint Online - Query a list action fields and settings table for all the configuration fields.

  1. Open the action in the configuration panel. For more information, see Add an action.
  2. In the Configuration section, select a SharePoint Online Connection. If you do not have a connection, see Add a connection on the Connections page.
  3. Note: Only the connections created with the List and libraries authentication method are available in the drop-down. For more information about authentication methods for SharePoint Online connections, see Authentication methods for SharePoint Online connections.

  4. Type a SharePoint site URL and click Retrieve lists.

    Example: https://domain.sharepoint.com/sites/hr

  5. Select the List name that you want to query.
  6. Caution: Querying and retrieving items from lists that contain 12 or more columns of the People, Lookup, or Managed Metadata type can cause a list view threshold error.

  1. Type a value for Item limit.

Retrieve the first item from the query results

The following example shows how the first item that is returned from the query can be retrieved. The following actions are used in this example:

In the Designer page:

Retrieve items from the query results

The Loop for each action can be used to retrieve items from a SharePoint Online list as described in the steps below. The following actions are used in this example:

In the Designer page: