Skip to main content
Nintex Community Menu Bar
Question

Nintex Automation Cloud , read file from SharePoint Document Library into File Variable?

  • February 16, 2026
  • 8 replies
  • 56 views

Forum|alt.badge.img+1

We are looking for a possibility to Get file from SharePoint On premises Documents Library into File variable in NAC Workflow.

Using "Call a web service on Premises" I was able to get the file but as binary format.

Is there any way to get it in BASE64 Format in order to encode it as FILE Variable?

THE Target is to get file from Documents library into File Variable in NAC Workflow.

Any Feedback will be very appreciated.

Kind Regards

Aram Aljammal

8 replies

Forum|alt.badge.img
  • Novice
  • February 16, 2026

We have the same problem. There is no GetFile Action in OnPremise. I hope someone has a solution.


Simon Muntz
Forum|alt.badge.img+23
  • Collaborator
  • February 25, 2026

Hi ​@Aram229,

You could use a web service, as you have to retrieve the file and then use a custom connector from the Nintex Gallery that converts the binary into Base64.
https://gallery.nintex.com/t/toolkit-for-nwc


Forum|alt.badge.img+4
  • Scholar
  • February 25, 2026

My experience was the same as herti’s: I wasn’t able to find a GetFile action for on-prem SharePoint.
Also - I wasn’t able to pass a Nintex “file object” directly to a web service: the Nintex workflow passed a Nintex “blog reference”, vs. the binary data.
My solution was to write an Xtension.  Nintex Xtensions correctly pass the binary “file” data to the back-end REST services.  i implemented my own base64 encoder that accepted the “File” data, and passed back a base64-encoded text string. Exactly like the “toolkit-for-nwc” does.


Forum|alt.badge.img+1
  • Author
  • Rookie
  • March 3, 2026

Hi ​@Aram229,

You could use a web service, as you have to retrieve the file and then use a custom connector from the Nintex Gallery that converts the binary into Base64.
https://gallery.nintex.com/t/toolkit-for-nwc

Hello ​@Simon Muntz 
Thank you for the info. I already tried to do that using these actions 
unfortunately with no success to convert the binary file into Base64. 
Did it work with you?

 


Forum|alt.badge.img+1
  • Author
  • Rookie
  • March 3, 2026

My experience was the same as herti’s: I wasn’t able to find a GetFile action for on-prem SharePoint.
Also - I wasn’t able to pass a Nintex “file object” directly to a web service: the Nintex workflow passed a Nintex “blog reference”, vs. the binary data.
My solution was to write an Xtension.  Nintex Xtensions correctly pass the binary “file” data to the back-end REST services.  i implemented my own base64 encoder that accepted the “File” data, and passed back a base64-encoded text string. Exactly like the “toolkit-for-nwc” does.

Hello ​@paulsm4 Thank you for sharing your feedback. 
Could you share me your own base64 encoder? Or give me some instructions how to convert the binary file into Base64 using “Toolkit for nwc”? It will be for me a big help. 
Kind Regards
Aram


Forum|alt.badge.img+4
  • Scholar
  • March 5, 2026

I happened to write my base64 in Javascript (nodeJS), but there’s an equivalent one-liner in most languages.

My Xtension:
 

...
"/fax/api/base64-encodefile3": {
"post": {
"tags": [
"Fax"
],
"summary": "Base64 Encode File3",
"description": "Base64EncodeFile3",
"operationId": "base64encodefile3",
"consumes": [ "multipart/form-data" ],
"produces": [
"application/json"
],
"parameters": [
{
"in": "formData",
"name": "formData",
"type": "file",
"description": "File to Encode",
"required": true,
"x-example": "SGV5IHdoYXRzIGdvaW5nIG9u"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"Filename": {
"type": "string",
"x-example": "VA-Test-RFS.pdf"
},
"Mimetype": {
"type": "string",
"x-example": "application/pdf"
},
"Base64": {
"type": "string",
"x-example": "SGV5IHdoYXRzIGdvaW5nIG9u"
}
}
}
},
"400": {
"description": "Bad request or invalid input."
}
},

 

My NodeJS back-end:
 

...
/*
* base64-encodefile3: Post image in multipart form/return base64 text as JSON object
*/
router.post('/api/base64-encodefile3',
uploads.single('formData'),
async function(req, res) {
console.log('fax api@BASE64-ENCODEFILE3...');
if (!req.file) {
return res.status(400).send('No file uploaded.');
}
try {
console.log('originalname=' + req.file.originalname + ", length=" + req.file.buffer.length + ', mimetype=' + req.file.mimetype);
console.log('Buffer.from(req.file, utf8)...');
const buffer = Buffer.from(req.file.buffer, 'utf8');
console.log('buffer.toString(base64)...');
const base64String = buffer.toString('base64');
const result = {
"Filename": req.file.originalname,
"Mimetype": req.file.mimetype,
"Base64": base64String
};
console.log('res.status(200).json(result)...');
res.status(200).json(result);
}
catch (error) {
res.status(400).send('ERROR: ' + error.message);
}
});

 


Forum|alt.badge.img+1
  • Author
  • Rookie
  • March 5, 2026

I happened to write my base64 in Javascript (nodeJS), but there’s an equivalent one-liner in most languages.

Thanks you for the feedback ​@paulsm4 
Does that apply to all file types ? I mean excel, pdf, word etc.
Could you please write me where to pass my Binary file in your script? 
Thanks in Advance.

 

 


Forum|alt.badge.img+4
  • Scholar
  • March 5, 2026

Yes, a Nintex “File” object is applicable to all file types: Excel, Word, .pdf, .svg, .jpg, etc. etc.

You must create an Xtension to define the interface for your back-end REST web service.

The Nintex runtime passes the File object from your workflow to your REST service as “"Multipart form data".

My example code calls Buffer.from() and buffer.toString('base64') to read the binary data from the Multipart form and encode it into a base64 text string.