Overview
This node integrates with Microsoft SharePoint via the Microsoft Graph API to retrieve documents from SharePoint document libraries. The List Documents operation fetches all documents within a specified document library path, optionally filtered and limited by user-defined criteria.
Typical use cases include:
- Automating document retrieval workflows from SharePoint for processing or backup.
- Integrating SharePoint document data into other systems or reports.
- Filtering and listing documents based on metadata or naming conventions.
For example, you can list all PDF files in a subfolder of your SharePoint Documents library or retrieve only specific fields like document ID, name, and last modified date for further automation.
Properties
| Name | Meaning |
|---|---|
| Document Library Path | Path to the document library to list documents from. Use "/" for the root/main Documents library or specify a subfolder path. |
| Additional Options | Optional parameters to refine the document listing: |
| - Filter | OData filter expression to filter documents (e.g., name eq 'document.pdf'). |
| - Select Fields | Comma-separated list of fields to include in the response (e.g., id,name,lastModifiedDateTime,size). |
| - Top | Maximum number of items to return (between 1 and 1000). Default is 100. |
Output
The output JSON contains the following structure:
{
"operation": "listDocuments",
"siteId": "string", // The SharePoint site identifier
"driveId": "string", // The drive (document library) identifier
"libraryPath": "string", // The requested document library path
"documents": [ // Array of document objects returned
{
"id": "string", // Document ID
"name": "string", // Document name
"lastModifiedDateTime": "string", // Last modification timestamp
"size": number, // Size in bytes
"webUrl": "string", // URL to access the document in SharePoint
"downloadUrl": "string", // Direct download URL
"mimeType": "string" // MIME type of the document
}
],
"totalCount": number, // Number of documents returned
"timestamp": "string" // ISO timestamp when the operation was performed
}
No binary data is output for this operation.
Dependencies
- Requires an API key credential with permissions to access Microsoft Graph API for SharePoint.
- Needs configuration of tenant ID, client ID, and client secret for OAuth2 client credentials flow.
- The node uses Microsoft Graph API endpoints to authenticate, locate the SharePoint site, find the document library drive, and list documents.
- Network connectivity to Microsoft Graph API endpoints is required.
Troubleshooting
Authentication errors:
If authentication fails, verify that the tenant ID, client ID, and client secret are correct and have sufficient permissions to access SharePoint via Microsoft Graph API.Invalid site URL format:
The node expects a valid SharePoint site URL. Ensure the URL is correctly formatted; otherwise, it may fail to resolve the site ID.No drives found for the site:
This indicates the specified SharePoint site does not contain any document libraries accessible with the provided credentials.Empty document list:
Could be due to incorrect library path or overly restrictive filters. Verify the path exists and adjust filter expressions accordingly.Rate limits or API errors:
Microsoft Graph API enforces rate limits. If you encounter HTTP 429 or similar errors, consider adding retry logic or reducing request frequency.