@vishesh.sharma.adtalem
In UiPath, by using HTTP request activity, can hit the API and save the response in desired folder.
Kindly refer to this thread, you may get some idea.
I tried ‘Save Response’ option of postman and saved the response as a file (response.pdf). I got the actual PDF file.
Now in UiPath, I’ve used HTTP Request activity, which is giving same response in string. How do I save that string as a pdf file?
I’ve tried writing the string response to a file directly using ‘Write Text File’ activity with encoding ‘UTF-8’, ‘ASCII’, ‘UNICODE’, and blank. But it’s giving a blank pdf only.
@postwick I’ve also tried converting response string into Bytes array so that I can write it into a file using System.IO.File.WriteAllBytes. I used 'System.Text.Encoding.<utf8, ascii, unicode etc>.GetBytes(stringResponse), but again I’m getting blank PDF only.
Sorry, I don’t really have an answer - I’ve never done that.
What I’m wondering is why you’re using the Salesforce API instead of navigating into Salesforce and directly downloading the files. That might be more straightforward, although you’re already pretty much there with the API.
You might need to do it with Invoke Code using some of this kind of vb.net code: