Http request upload attachment

Dear Community,

I am trying to upload an attachment to ServiceNow API.

I am passing the parameters given as below:
EndPoint :“
Body : table_name,table_sys_id, file path
Body format :multipart/form-data
Attachments : filepath
Headers : content-type,accept format

I am getting the error as file part not found. Attaching the error screenshot.
Please suggest some solution.

Please check if the file is read-only to you @Akansha… And are you sure, the table name and table sys are body or URL parameters?

Have you tried to upload the file in post man?

Hi Harish,

I even tried in Postman and getting the same error.
Please let me know what else I need to pass as parameters.

Thanks in advance.

You need to add the file as binary in the postman, as you are attaching a file @Akansha

Under post request> body> binary > browse the file


Hi Hareesh,

I tried to upload the file in form-data and it worked.

Thank you!!

We don’t have option as form data in UiPath @Akansha,

The only thing we have is attachments, so, try using that and upload the files :slight_smile:. That will work for sure and remember, try without sending the header content type

1 Like

can you send sample working flow?..Am also trying to create a ticket in servicenow.

Thanks, this helped a lot!

try remove all headers and pass absolute path in the attachment ( dont know if ur api needs a token, but if it does keep that in header else keep it clean )

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.