How to Save rest Api response content to CSV in Pega Robotics

I have a requirement. i will be execution Pega SPOS rest Api call to download the file from repository, which is S3 here, response of the Api call is csv text mapped to string.

I need to save the content to csv or a text.

i am not able to identify the delimiter to split the csv string content and save it to lookup table.

Please suggest the specific toolbar options to split the content and as well as save it to a csv file.

Hi @AnuroopSamratS16978510

Response of the Api call is csv text mapped to string u wanted to save the content to csv or a text.

could you please refer the following reference link which may help you in delimiter to split the csv string content and save it to lookup table

Convert a TXT file into CSV format in Pega Robot Studio | Support Center

Hope this would be helpful!

Thanks and Regards
Swathi Duvvala

@SWATHI SRINIVAS i need to save the rest Api response in a csv. Need the process for it.
The reference link you shared is having info for converting txt file to csv.

@AnuroopSamratS16978510 Can you provide an example of the string? If the string is already in whatever format you eish to save to the file, you can use a Static method from the GAC to write a string to a file.

In 19.1, you would right-click on the Toolbox and select “Choose items”. You would then select the “Global Assembly Cache” radio button. Select the latest “mscorlib” assembly. Locate the “File” node and find the WriteAllText method. Check it to add it to your Toolbox.

@ThomasSasnett string data is in below format
8888888,123CRLF

9999999,-123CRLF

9955555,-123CRLF

I tried right-click on the Toolbox, but i am not seeing the “Choose items” options

@AnuroopSamratS16978510 I apologize for the confusion. You should right-click inside of the tab of the Toolbox where you want the method added. I generally add these to the General tab.

@ThomasSasnett Thank you for the clarification.