20-07-20 03:05 PM
Hello,
I would like some advice regarding how to download a file from Salesforce to local folder.
I'm using the BP Skill "Salesforce" to obtain the ContentDocumentId.
I use the following "GET" API to retrieve the base-64 from Salesforce
/services/data/v47.0/sobjects/ContentVersion/[Id]/VersionData
I'm stuck with how to convert the response content to a physical file.
I figure I have to use the code stage to convert the data, but I'm not quite sure how to achieve it.
Any help would be highly appreciated.
Best Regards
Met Vonghiran
21-07-20 02:20 PM
21-07-20 03:15 PM
22-07-20 01:23 AM
Thank you Ashish and Ishan
I tried the code and it was able to create a file. This is really a big progress.
However, I just realize that the result that I got from using REST API was not in base64 format (it was a raw binary).
Based on the discussion in the link below, I have to create a SOAP API request. If I'm able to achieve that then I could combine with the code stage that you provide to get a physical file.
https://stackoverflow.com/questions/60283198/get-base64-data-of-file-from-salesforce
I'm still new to the concept of API and how to use BluePrism to call it.
I will try to use Utility-HTTP to see if I could get the base64 out of Salesforce or not.
Thank you so much