HTTP Request Attachment as CSV File is Over Writing with Header and Parameter details which i have mentioned in Collections

Hi Team, Good Day!
I am creating a Service Request in Service now Via API and i got the Response.

from that response i will get the required information which is used to hit Attachment file API to the Created SR only.

Here to Create SR in first API and File Attachment to the Same Created SR is Second API.

after hit the second API with CSV file and File name. the file is attaching to the created Service Request but when i downloaded the file and verified the file is look like the attachment.

Actual out put i am getting :

Expected output:

i know that i am missing something to Add a header so kindly help me to get it resolved.

Hello @saikumar.kuncha
You can use Regex to get the Expected Output
Trty this




Thank you so much for the Quick response @Gokul_Jayakumar.

But, Actually my work is finished after Attaching the File to the SR .
So the file needs to be uploaded to the SR as it is presented.

But When i am attaching the File the file is uploaded to SR with an updated Unwanted data
like :

After attached file downloaded the presented file data is: I don’t need this

From Hear to (

Content-Disposition: form-data; name=“table_name”

Content-Disposition: form-data; name=“table_sys_id”

Content-Disposition: form-data; name=“file_name”

Content-Disposition: form-data; name=“file”; filename=“UPT_DATA_AUTOMATION_Q_03-04-2023.csv”
Content-Type: application/octet-stream

 Hear ) Cust Ctry,Product ID,Customer L4,LOCID

If you identify the Data which is in the CSV file after downloading it from SR request. it contains the additional data.

the actual file data is : I need to upload the data like this and when i download it from SR the file should only contains this actual information

Cust Ctry,Product ID,Customer L4,LOCID

while uploading the File the Headers or the Parameters are over writing the CSV file which i am attaching to the SR.

Appending the beginning the file

Appending the After the file

Kindly refer to this xaml file, you may get some idea. (150.7 KB)

Thanks for the Solution @Gokul_Jayakumar
but here when i upload attachment it should only upload the file content not with Header details or Parameter details.

Try to Uncheck the With headers option in the Write CSV activity.

Did you ever figure this out? I’m experiencing the same issue.