Get Document Details
AI-generatedOverview
This node operation retrieves detailed information about a specific document from a SharePoint document library using the Microsoft Graph API. It is useful for scenarios where you need to fetch metadata and properties of a document by its ID, such as document name, size, modification date, and download URL. For example, it can be used to display document details in a workflow or to verify document attributes before further processing.
Use Case Examples
- Fetching document metadata to display in a dashboard.
- Retrieving document properties before downloading or moving the file.
- Validating document details in an automated approval process.
Properties
| Name | Meaning |
|---|---|
| Document ID | The unique identifier of the document to retrieve details for. |
Output
JSON
operation- The operation performed, which is 'getDocument'.siteId- The SharePoint site ID where the document resides.driveId- The drive ID (document library) containing the document.documentId- The ID of the retrieved document.documentid- The document's unique identifier.name- The name of the document.lastModifiedDateTime- The last modification date and time of the document.size- The size of the document in bytes.webUrl- The web URL to access the document in SharePoint.downloadUrl- The direct download URL for the document.mimeType- The MIME type of the document file.createdDateTime- The creation date and time of the document.lastModifiedBy- Information about the user who last modified the document.createdBy- Information about the user who created the document.
timestamp- The timestamp when the operation was performed.
Dependencies
- Requires Microsoft Graph API access via an API key credential for SharePoint.
- Needs valid SharePoint site URL and OAuth credentials for authentication.
Troubleshooting
- Error 'Invalid client credentials' indicates incorrect or expired API credentials; verify tenant ID, client ID, and client secret.
- Error 'Could not find folder' or 'No drives found' suggests incorrect site URL or document library path; verify the SharePoint site and library paths.
- Access denied errors indicate insufficient permissions; ensure the API credentials have appropriate SharePoint access rights.
- Network or HTTP errors may require checking connectivity and Microsoft Graph API service status.
Links
- Microsoft Graph DriveItem resource - Documentation on the DriveItem resource used to represent files and folders in Microsoft Graph.
- Get DriveItem API - API reference for retrieving a DriveItem (document) details from Microsoft Graph.