@Dorota_Maliszewska The “id” field IS in the response but it’s often a long string that contains additional metadata. You need to extract the GUID from it.
When you get items from SharePoint, the id field looks something like this:
The part you need is usually the first segment before any hyphens or special characters
To extract the file id add a Function Node after your “Get Many Items” node
// Extract the clean file ID from SharePoint's response
const items = $input.all();
const processedItems = items.map(item => {
const fullId = item.json.id;
// Extract the GUID (first part before any special characters)
const cleanId = fullId.split(/[-_]/)[0];
return {
json: {
fileId: cleanId,
fileName: item.json.name,
webUrl: item.json.webUrl,
// Include other fields you need
...item.json
}
};
});
return processedItems;
But alternatively you can download directly with weburl
Thank you for your quick reply.
Could you please point out which specific element contains the file ID?
And how can the file be retrieved using the webUrl? Which node should be used for that? { “@odata.etag”: “#etag1”, “createdBy”: { “user”: { “email”: “#email1”, “id”: “#id1”, “displayName”: “#name1” } }, “createdDateTime”: “#datetime1”, “eTag”: “#etag1”, “id”: “#itemId1”, “lastModifiedBy”: { “user”: { “email”: “#email1”, “id”: “#id1”, “displayName”: “#name1” } }, “lastModifiedDateTime”: “#datetime1”, “parentReference”: { “id”: “#id2”, “listId”: “#id3”, “siteId”: “#siteId1” }, “webUrl”: “#url1”, “contentType”: { “id”: “#id4”, “name”: “#name2” } }
I’m facing the same issue, I want to get a list of files from a document library and download them but the id’s returned don’t ressemble the actual file ids
I have same issue. I can get many info with Get many items but I need drive ID for Download File what is not included in Get many items response even if I turn off simplify option. Atm I think sharepoint node pretty useless or I am noob. But I see there are people who have some problem as mine. Zelite your method not working cuz I got this type id like