Sharepoint Rest API - Upload file to List Item

Hi Team,

I am facing problem while doing attachment for Sharepoint Rest API call via UiPath.Web.Activities.HttpClient.

As i am done with insertion of new list item, but whenever i am doing attachment. Its not inserting. I want to with the help of HttpClient only as this is the only requirement i have.

I stuck here from last 2 weeks.



Hi @Pankajsapkal07

The easiest way to debug the HTTP Request activity is to use the website.

Simply send the same request from a working source (such as Postman) and from UiPath using the HTTP Request activity and compare the resulting outputs on the This will give you some clues as to what is being send wrong.

Hello Pankaj,
In this video, you can see how I upload files to multiple systems (Maybe this will help you with your issue):
Uipath upload files in Jira (REST API) (HTTP REQUEST) | Jira REST API upload file - YouTube
ServiceNow Upload files without Administrator Rights with UiPath Robots | RPA files | REST API file - YouTube
Cristian Negulescu

Apologies for resurrecting an ancient thread. Did you ever figure this out?

I have the same need. I can get files attached to the list item via this endpoint: “/_api/lists/GetByTitle('” + in_ListTitle + “')/items(” + in_ListItemId + “)/AttachmentFiles/add(FileName='” + in_FilePath + “')”

But I can’t figure out how to encode them. Every method I’ve tried ends up attaching a file to the list item with junk contents.