using multipart/form-data to post document to iManage

Certified Associate Developer

Hello,

I am trying to set up an integration to post a document to a folder in iManage. This integration requires the request body to be multipart/form-data, and to pass through the document to be uploaded and the document "profile" which contains information which will be added to the document on the iManage side.

below is how the integration is set up in postman:



And this is how I have set up my integration (second screenshot showing the expression I have built for the profile part):

and this is the error I am getting: 


Would anyone have an idea of where I am doing things incorrectly? It would seem to me as though the content type is not passed through properly, as seen by the content type field in the header section of the httpResponse.

Thank you

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Associate Developer
    in reply to louisg5816

    UPDATE: I have since been able to get this to work and the solution is quite simple here is what I have done:

    • Removed the "content-type" header entirely, this is automatically set by Appian when you set the request body to be in multipart/form-data format
    • when giving the profile attributes in JSON format, in the expression rule the entire JSO needs to be wrapped in an a!toJson()
    • reduced the numbers of parameters in the profile part (I have only kept the required ones), while having the other parameters will not cause an error, for simplicity's sake I have trimmed them down

    Below are screenshots of the listed changes:

       

Children