Uploading file to Sharepoint Folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-07-22 10:12 AM
I'm looking to upload/copy/save an Excel file to a specific Sharepoint Folder. Firstly, my apologies in advance - I am by no means an expert in working with SharePoint. I'm aware that there is the Graph API for interacting with SharePoint, but I have absolutely no idea how that works in practice (is there an idiots guide somewhere as to how this integrates with Blue Prism?). I'd like to think that there was a simpler solution to this particular issue anyway - denoting a save path on SharePoint for the document from with the 'Save Workbook As' object within the Excel VBO - but I cannot seem to get this to work.
So actually, I guess there are two questions that I currently have:
* Is there a simple way to save an Excel file to a specific folder on SharePoint? If so, how?
* How does Graph API work for someone who's not overtly familiar with SharePoint and indeed API's in general? The documentation is fine but could benefit from some example structures within Blue Prism.
Not sure if it over-complicates things, but the file(s) I'll be looking to upload will just under 6mb - from what I understand, there may be a 4mb limit on the Graph API Upload File action?
I should add: one thing I've seen mentioned is about uploading to OneDrive and then syncing to SharePoint, however unfortunately, my organisation has blocked this.
------------------------------
John Hammond
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-07-22 12:58 PM
------------------------------
Neeraj Kumar
Technical Architect
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-07-22 04:21 PM
Most of the straight upload functions in Microsoft Graph have relatively small file size limitations. 4MB seems to be the default. To address this, Microsoft supports a feature known as resumable uploads or upload sessions. An upload session is basically a dedicated temporary URI endpoint for you to upload any size file to. To use an upload session there are a series of requests that you make to Graph:
- Request creation of the upload session. Assuming this is successful, the new URI is returned to you.
- You'll provide the following details:
- Site ID - The unique ID of the specific SharePoint site.
- Drive ID - The unique ID of the SharePoint drive that will hold the file.
- Folder Path - The path within the SharePoint drive where the file will reside.
- File Name - The name of the file as it will exist on SharePoint
- Auth Token
- You'll provide the following details:
- Upload the actual file using the new URI as the destination.
There's an asset on the DX called Microsoft Graph API - SharePoint Upload Sessions that can be used for this actions. To use this connector you will need to have application registration within your Azure AD as well as a Client ID and Client Secret for the OAuth authentication and authorization. That app registration will also need the appropriate Microsoft Graph permissions applied to it. Generally this means Sites.ReadWrite.All when using Application Access credentials.
Hope this helps.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-22 01:37 PM
______________
DJ Lombardo
------------------------------
Daniel Lombardo
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-07-22 03:01 PM
There are a few ways to get the Drive ID. The easiest is to use the Get Default Drive Details or Get All Drives actions on the Microsoft Graph - SharePoint connector. All you have to do is pass in the Site ID of the specific SharePoint site and it will return details of the drives associated with that site.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-07-22 11:11 AM
What about scenarios where the uploaded file are really big (for ex. 1 GB) and BluePrism returns a System.OutOfMemoryException?
I know this is more related to machine memory than to the objects themselves, but maybe someone has already solve this type of case?
Thanks
------------------------------
Kacper Sochar
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-07-22 01:35 PM
I too have same kind of scenario which runs in to several complications.
the best solution i believe is sync the Share point folder to machine where your robot runs , so you can just copy the files and can avoid all steps to access/upload to SP.
------------------------------
Krishna Elapavuluri RPA Solution Lead
TEchnology Consultant
DXC.technology
Asia/Kolkata
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
21-07-22 01:44 PM
Yes, this is a limitation in the current implementation of the SharePoint Upload Sessions connector. Presently, it attempts to read the entire contents of the file into memory before chopping the binary array up into chunks for sending to SharePoint. We have an item in our backlog to change this behavior, and I hope to see that update pushed to DX in the next week or so.
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-07-22 09:51 AM
Alternative approach:
We use SharePointOnline (SPO) as well as OneDrive. If you have the same setup, then you could try this:
Once you have used a SPO link on your computer, it will probably have been mapped up within your OneDrive as well. As such, the OneDrive SPO link has a shortcut in style with:
C:\Users\Paul\OneDrive - Paul\SPO Folder\SPO Subfolder\...
Instead of having the process use SPO via a browser, it can use SPO via its shortcut. That way, you avoid interacting with an ever changing SPO interface that shows new popups every second week and requires you to login again and again without end, not to mention the infamous Sync button messing up your folders and files.
------------------------------
Happy coding!
Paul
Sweden
------------------------------
Paul, Sweden
(By all means, do not mark this as the best answer!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
22-07-22 10:00 AM
------------------------------
John Hammond
------------------------------
