Hi Masoma,
For this specific requirement you can use both
Google Drive API and
Google Sheet API . For integrating both these services with Blueprism you can use the the DX exchange connectors as well:
Google Drive V3 and
Google Sheets V4 For using the services, you need to create a service account in your Google Workspace and then you can enable the APIs and generate the private keys which will be used in the credential manager of your Blue Prism client. You can refer to the documentations in each of the DX exchange connector page which explains it clearly.
Theoretically there are two straightforward solutions that come to my mind:
First Solution:- First, you can use the list function call of drives from Google Drive API which will return you all the drive ID's in your Google Drive account. You can filter out the correct drive id where you want to work
GET https://www.googleapis.com/drive/v3/drives
- Second, you can use the list function call of files from Google Drive API which will return you all the file ID's at the respective 'driveid' parameter which you provide. (Determine the drive id first using the first step)
https://www.googleapis.com/drive/v3/files
- Once all the file id's are determined, iterate through them one by one and you can use the API functions of Google Sheets API. There all the functions accept a parameter called as 'sheetid' which is same as the current 'fileid' you are working on. Pass the aprameter and perform the operation.
Second Solution:
- First, you can use the list function call of drives from Google Drive API which will return you all the drive ID's in your Google Drive account. You can filter out the correct drive id where you want to work
GET https://www.googleapis.com/drive/v3/drives
- Second, you can use the list function call of files from Google Drive API which will return you all the file ID's at the respective 'driveid' parameter which you provide. (Determine the drive id first using the first step)
https://www.googleapis.com/drive/v3/files
- Once all the file id's are determined, iterate through them one by one and you can use the export function of the Drive API itself to download the files as a bit stream and then you can write the same to any given excel file. This will download the files for you and then you can perform excel operations directly.
GET https://www.googleapis.com/drive/v3/files/fileId/export
NOTE: The second solution won't be using Google Sheets API at all however, the limitation is that you can only download files worth 10 MB if I am not wrong. Moreover, continuous downloading might make your workflow bit complicated as you need to check as well if the files are getting downloaded properly or not------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Automation Consultant
Blueprism 6x Certified Professional
Website:
https://devneet.github.io/Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.