Skip to main content
Nintex Community Menu Bar
Solved

Copying documents attached to a Nintex form to a SharePoint Online Document Library

  • March 4, 2025
  • 6 replies
  • 40 views
  • Translate

seanobryant65
Forum|alt.badge.img+4

I have a workflow that starts with a Nintex Form.  The form allows for the uploading/attaching of supporting documents.  I am successfully writing the form data into a list library in SharePoint Online, but cannot seem to copy the attachments to a document library.  I get this error: Received an error response from the connector: BadRequest: [SP.GNR.ListItemsNotFound] Unable to find matching list items for the list 'ProclamationRequestAttachments'. (Correlation Id: 1b7d84c4-4519-4253-b9df-c8ae9389380f)

The document library does exist, permissions are correct also.  I don’t think it is a SPO issue, but maybe I’m not capturing the attachments correctly.  Below is the workflow:

The run if true was just to keep that part of the workflow from executing if there were no document attachments on the form.  I am able to attach the documents to the “Send Notification to CSO” action, so they are attachments in the notification email.  Just can’t seem to copy them to SPO.  I am certain I’m missing something, but haven’t figured it out.

 

Thank you for any help!

Best answer by rickdemarco

The file upload control outputs a collection as it could contain multiple files, what you need to do is use a loop and iterate through each file in the collection and use the store a file action for each one. 

 

 

 

View original
Did this topic help you find an answer to your question?

6 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • 2452 replies
  • March 5, 2025

Hi ​@seanobryant65,

I just wanted to let you know that the action you are using is to move files from a document library to a repository.
It sounds like you want to add your attachments to a document library.

If this is the case, use the SharePoint Online Store a File action.
https://help.nintex.com/en-US/nwc/Content/Designer/Actions/SharePointOnline-StoreaFile.htm

 

Translate

seanobryant65
Forum|alt.badge.img+4

That is probably what I need, but I am trying to store the documents that the user attaches to the form.  Those are the documents I want to store in SharePoint online.  I do not see a way to capture those.  I am able to attach them to an email notification, but the form variable is not active when I use the store a file action.

 

 

Translate

rickdemarco
Nintex Employee
Forum|alt.badge.img+8
  • Nintex Employee
  • 69 replies
  • Answer
  • March 5, 2025

The file upload control outputs a collection as it could contain multiple files, what you need to do is use a loop and iterate through each file in the collection and use the store a file action for each one. 

 

 

 

Translate

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • 2452 replies
  • March 5, 2025

Hi ​@seanobryant65,

A file upload control can hold multiple files so it has a data type of collection.
When you attach files to an email, you are attaching all the files, so the action accepts the collection.
As a document library can only have one file per item, you cannot send all the files at once.

You can either loop through them as per Rick's post, or you can use the get item from the collection action and store the file in a file data type, which can then be used in the store a file action.

(Rick was replying at the same time as me :)
 

Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 667 replies
  • March 17, 2025

Hi ​@seanobryant65 
Has your question been answered? 

Translate

seanobryant65
Forum|alt.badge.img+4

I figured out a way to do it that works well.  First I added to the form a “Yes No” selection, giving the person filling out the form the option of attaching a file or not.  Then in my workflow I added a run if true.  Set a variable for the attachments and if the user selected yes then run “Get item from collection” where the target collection was the attachment section of the form.  Stored items in a variable and then used a “Store a file” action to write the attachment(s) to a sharepoint doc library..

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings