Skip to main content
Nintex Community Menu Bar

How to Retrieve a Document Within a Sub Folder in Nintex Workflow

  • October 12, 2026
  • 0 replies
  • 4 views

Forum|alt.badge.img

Overview 

This article explains how to retrieve a document stored within an on-premises SharePoint subfolder when using Nintex Workflow and Nintex Gateway. It is intended for workflow developers, solution architects, and support engineers working with SharePoint Hybrid integrations. The guidance helps prevent workflow failures caused by incorrect file paths and document location references. 


When to Use This 

  • A document is stored inside a SharePoint subfolder.
  • A workflow needs to retrieve a file for processing.
  • Get File Content actions cannot locate the document.
  • Working with document libraries containing multiple folder levels.
  • Automating approvals, document generation, or file transfers. 


Limitation

Workflows may fail to retrieve a document even though it exists in SharePoint. Files in the root folder can be found, while documents located in subfolders return errors such as “File not found”, “The specified file does not exist”, or “Resource cannot be located.” 


Root Cause

Many SharePoint actions require the full server-relative path to the document. When only a file name or incomplete path is supplied, SharePoint searches the wrong location and cannot find the file. 


Solution

Always reference the document using its complete folder path, including the document library, all subfolder levels, and the file extension. Using dynamic variables for folder locations improves maintainability and reliability. 


Examples

❌ Incorrect 

Documents/TestDocument.docx 
Explanation: The file exists in a subfolder, but the path is incomplete. 

 

❌ Incorrect 

TestDocument.docx 
Explanation: Only the file name is provided. 

 

✅ Correct 

Documents/Projects/2026/TestDocument.docx 
Explanation: The complete folder path is supplied. 

 

✅ REST API Example 

GET _api/web/GetFileByServerRelativeUrl('/Documents/Projects/2026/TestDocument.docx') 
Explanation: Retrieves the file directly using its server-relative URL. 


Important

  • Always include the file extension.
  • Verify SharePoint permissions.
  • Spaces and special characters may require URL encoding.
  • Avoid hardcoding folder paths when possible.
  • Hybrid gateway connectivity should be healthy. 


Related Topics 

Querying Lists with Content Types 

SharePoint REST API File Operations 

Working with Nintex Gateway 

Nintex Gateway Troubleshooting