Actions11
- Message Actions
- Calendar Actions
- SharePoint Actions
SharePoint → Get Files from Folder
AI-generatedSummary
Retrieve files from a specified folder in a SharePoint document library, optionally including files in subfolders, with filtering by file extension and an optional limit on number of files returned.
Inputs
- SharePoint Site (required) — Select the SharePoint site to access the document library from.
- Document Library (required) — Choose the document library (drive) containing the folder.
- Folder Path — Specify the folder path inside the document library to list files from. Leave empty to use the library root.
- Recursive — Enable to include files from all subfolders recursively; disable to list only direct children of the folder.
- Download File Content — Choose whether to download the file content as binary data on the output items or to return only metadata.
- File Extensions Filter — Comma-separated list of file extensions to include. Only files matching these extensions will be returned. Leave empty for no filtering.
- Max Files — Maximum number of files to return. Set to 0 for no limit (retrieves all matching files).
Output shape
a list of items representing files, each including metadata and optionally binary data under the 'data' property if content is downloaded
Returns metadata fields such as id, name, fullPath, size, mimeType, createdDateTime, lastModifiedDateTime, and webUrl. If 'Download File Content' is enabled, each output item includes the file's binary content in a binary property named 'data'. The operation supports pagination internally to fetch all items up to 'Max Files'. Errors in listing or downloading individual files are returned as items with success=false and error details in the JSON.
Examples
Example 1: Get all PDF files recursively from folder 'Invoices/2024/April'
Set 'SharePoint Site' to the target site, 'Document Library' to the desired drive, 'Folder Path' to 'Invoices/2024/April', enable 'Recursive', set 'File Extensions Filter' to 'pdf', and set 'Max Files' to 0 (unlimited). Enable 'Download File Content' to get file binaries.