Skip to main content
aishwaryap610839
Participating Frequently
Apr 2, 2025 1:22 AM UTC
Question

how to get document file size, extension details from sharepoint integration

I am trying to fetch document metadata from sharepoint Integration which I have bult using pre built sharepoint connected system by appian. As I am retrieving the data I could not find the document data for its size, extension etc how can I achieve this as  I need the data to store document information in table.

3 replies

karumurua531442
Participating Frequently
Apr 2, 2025 2:45 AM UTC

Hi [mention:7bd80d20e8d5464ba14fd461c9056f13:e9ed411860ed4f2ba0265705b8793d05]  AFAIK you will not be able to find document data for its size, extension Appian does not directly expose file metadata like size and extension when retrieving a document. May be you need to use some Microsoft Graph API

mathieud0001
Genius
Apr 2, 2025 2:48 AM UTC

Unsure on how to do it with the built in connector. But perhaps you can try the regular HTTPS connector with the SP REST API.

learn.microsoft.com/.../working-with-folders-and-files-with-rest

varuntejg243705
Inspiring
Apr 2, 2025 4:56 AM UTC

Hi [mention:7bd80d20e8d5464ba14fd461c9056f13:e9ed411860ed4f2ba0265705b8793d05] ,

I would suggest you to use Microsoft Graph API, as we can get the required custom properties of a file easily.

The Microsoft Graph API provides detailed metadata, including file size, extension, and other properties.

Endpoint will be: GET

https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/items/{item-id}


Response will be in json : 

{
  "id": "12345",
  "name": "Document.pdf",
  "size": 1048576,
  "file": {
    "mimeType": "application/pdf",
    "hashes": {
      "sha256Hash": "abc123..."
    }
  }
}


- If Connected System does not support fetching metadata, create a separate Appian integration using the Microsoft Graph API.

Hope this helps you!!!