First of all, there are similar questions on this forum, but I don't really know if and how I can adopt them to my Use-Case, which is based on a workflow script.

I am working on a script, which exports from another application (Polarion ALM) a file to a Word document. I have succeeded with the export job itself (it is running). Now I would like to automatically move this exported result to a SharePoint library.

My code is ending like following:

    var exportResult = exporter.getResult();

            if(exportResult != null){

            } else {
                throw new UserFriendlyException("Export to Word failed");

As I am a beginner to Webservices and JavaScript, I don't really know how to continue from now. I found some tutorials in the web about scripts concerning document upload to SharePoint library, but I don't really know how to adopt them to my use-case.

I am working with SharePoint 2013. I appreciate any kind of help.

  • From Where you are running your code? – Arulraj Oct 19 '18 at 8:21
  • @ Arulraj: From the other Application (Polarion ALM) in a workflow context – SteffPoint Oct 19 '18 at 8:30

I have no idea about Polarion ALM. You can try the following approaches,

  1. If possible, use C# and Sharepoint client context(CSOM) in your application.
  2. Save the document in your local machine, where the application is running and use PowerShell script to upload the saved file to SharePoint application.

Up to my knowledge, these are the solutions, what I can suggest for you. Please feel free to ask help if you need anything on these.

  • Thank you very much for your answer. Can you provide me some Code, as I have never worked with C# and CSOM? – SteffPoint Oct 19 '18 at 9:40
  • to 1) Do you know what I can integrate to my code for saving the file locally? – SteffPoint Oct 19 '18 at 9:43
  • If possible use first approach. – Arulraj Oct 19 '18 at 9:46
  • 1
    to save file locally use Filesaver js. – Arulraj Oct 19 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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