0

In my SharePoint site I need a workflow that gets the file data of each document in a library. Now I have a site workflow which queries on a certain libary and then loops through a foreach. In the loop I'm updating the properties of each item.

Here I want to fetch the file content. In an item workflow I can use [FileData] to get a base64 string with the document data.

Searching on this, some suggestions were the Read document action (which I don't have in the Nintex Workflow) or to do a web request (https://community.nintex.com/t5/Nintex-for-Office-365/Get-document-from-Document-library-as-Base64/m-p/75264). This should return the binary stream of the document.

This is the request I executed:

https://SharePointUrl/_api/web/lists('list guid')/Files('*document name*')/$value

And this is the result I get:

    Response status code: 200

    Response content:
          PK

Does anyone has an idea how to get the binary stream of the document, which I later will use to convert to a base64?

  • What are your plans for the files? – Billy Aug 27 at 15:42
  • @Billy I want to send the queried documents via DocuSign to get some signatures – NiAu Aug 27 at 19:11
0

Have you tried using:

https://SharePointUrl/_api/web/GetFileByServerRelativeUrl('/docunentLibrary/panda.jpg')/openbinarystream
  • Yes, I tried that. Same response. – NiAu Aug 28 at 5:33

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.