I am working on a project where I need to copy a document from one site to another site in Office365. I want to achieve this using SP designer workflows. I learn that I can use SPFileCollection.Add method to achieve this. However I couldn't figure out the correct REST URL so that I can use it in call HTTP WebService step in Workflow. Any help on this is appreciated.

1 Answer 1


REST Endpoint URL to add a file to library

<appWebUrl>/_api/sp.appcontextsite(@target)/web/getfolderbyserverrelativeurl('<serverRelativeUrlToFolder>')/files" + "/add(overwrite=true, url='<fileName>')?@target='<hostWebUrl>'

But you may need to use JQuery with REST, refer the below link for more details.

Reference: MSDN

SPD is not going to help in this case, your choices are limited. As there is no direct option, you must handle it by a trigger of an even which is going to be a client side event such as page load, button click, mouse over, etc.

If you are going to fo it in a custom page use appropriate function calls by injecting the JS into it.

If it is a List forms, you may use presaveaction() method.

  • Hello Nagarajan, Thank you for your reply. Is there any way we can use jQuery with REST in sharepoint 2013 designer workflows?
    – Vindev
    Commented Jun 9, 2016 at 11:20
  • No direct option to have jquery and SPD workflow. So handle it in JS itself. Commented Jun 9, 2016 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.