capabilities.work

Search for a Document and Download It

A 2-step recipe with Microsoft SharePoint. We can help you get access.

Recipe · 2 steps

Search for a Document and Download It

Search SharePoint content and download the highest ranked matching document.

  1. Execute the search query. selectproperties is pinned to a fixed, ordered set so the returned cell positions are stable: cell 0 is Title, cell 1 is Path, cell 2 is FileType, cell 3 is LastModifiedTime. Change that list and the pointers in th
  2. Download the top ranked document using the Path cell from the search result. Search returns Path as an absolute URL, so a caller running this against a live tenant should reduce it to the server-relative form this operation expects.
What you'll need to have ready
  • queryText: Keyword Query Language text, e.g. "quarterly report filetype:docx".
  • rowLimit: Maximum number of search rows to return.
For your developer

Arazzo workflow sharepoint:search-and-download, 2 operations: searchQuery → downloadFile. Specs on APIs.io.