Skip to main content
Nintex Community Menu Bar
Answer

copy list attachments to document library count = 0

  • December 12, 2017
  • 4 replies
  • 97 views

Forum|alt.badge.img+6

Hello,

 

I'm trying to copy list attachments to a document library.  I'm using Vadim's example @ Nintex Workflow for Office 365 - Copy Attachments to Document Library - Vadim Tabakman 

 

It is not working for me so I have emails being sent to me to try to track down the issue.  I seem to never get a count on the attachments.  the web response code is "OK"

 

I copied the exact string I'm sending to the email as well.  this is it:

 

tempstring =

https://MyTenant.sharepoint.com/org/legal/compliance/_api/web/lists/GetByTitle('NewLaw')/Items/(98)/AttachmentFiles

 

the list:

 

The workflow

 

 

 

For some reason it just will not work.  Any ideas?

Best answer by Chris_Ben

Hi Robert,

I was using this function today so it should work so you're almost there!

Can you check that you've definitely set the Request Headers dictionary properly. 

Also, you know how you made that temp string?  Did you create that as a variable and put your exact code in it?  i.e the workflow context site url + org/legal/compliance etc + item ID.  Log that variable and check that it creates the string exactly as you want it.  e.g. check the getByTitle part doesn't have any extra spaces in it.

Cheers,

Chris

4 replies

Chris_Ben
Nintex Employee
Forum|alt.badge.img+14
  • Nintex Employee
  • Answer
  • December 14, 2017

Hi Robert,

I was using this function today so it should work so you're almost there!

Can you check that you've definitely set the Request Headers dictionary properly. 

Also, you know how you made that temp string?  Did you create that as a variable and put your exact code in it?  i.e the workflow context site url + org/legal/compliance etc + item ID.  Log that variable and check that it creates the string exactly as you want it.  e.g. check the getByTitle part doesn't have any extra spaces in it.

Cheers,

Chris


Forum|alt.badge.img+6
  • Author
  • December 14, 2017

Hello Chris, thanks for the encouragement.  Perhaps a second pair of eyes will catch what is probably a dumb mistake.  The temp string I build is only for sending it to me in an email so that I could make sure I was sending the correct information in the web call.  Like logging, but instant gratification through email :-)

Here is where I build the responseHeaders.  I have looked over this and it looks ok to me, but this would not be the first time someone catches a syntax mistake even after I bet my house that it was correct.


Forum|alt.badge.img+6
  • Author
  • December 14, 2017

MODEM!

Yep, too quick at selecting my output variables.  I selected ResponseHeaders instead of ReqestHeaders. 

Thanks for your help!


Chris_Ben
Nintex Employee
Forum|alt.badge.img+14
  • Nintex Employee
  • December 14, 2017

Good work!