3

I using SharePoint Online 2013 and Workflow 2013.

I need copy a file in the library "A", folder "Test1" to the library "B" to the folder "Test2". I need do this using Workflow.

In the function "copy" of the workflow, I can't define the path of the file.

Can I define a path in Action/Function?

5

You can't do this using out of the box workflow actions. I don't know any 3rd party workflow actions set which works with SharePoint 2013 workflows and allows to copy documents. There are only custom actions for SharePoint 2010 workflows.

For now you have three options:

I and my team are working on Workflow Actions Pack for SharePoint 2013 workflows, we have such workflow action in our roadmap, but we have not had time to implement it yet. You can contact us to sign up for release.

Update: We released document processing workflow actions for SharePoint 2013 and Office 365. Read blog article for details.

  • 1
    Actually, I think your REST suggestion is a good one. We use this in some of our workflows without problems, and they are easy to test out. There might even be an endpoint for copy – eirikb Apr 10 '14 at 5:44
  • I added the link to REST API reference into my reply. This is new API from MS, I'm not sure it is on premise version yet. – Anton Khritonenkov Apr 10 '14 at 6:11
  • "On premise" as in local installs? Well yes, it is all over the place, including but not unique to 365. – eirikb Apr 10 '14 at 6:17
0

You can do this using default workflow actions. It's a bit tricky though.

First you have to have an extra column in your document type. I've added "Resource Identifier" to my default document type.

Then as part of the workflow action you set the resource identifier column to a specific value, say 'XX'

Then you copy the document to the other library.

Then you do an update item on the destination library. You filter for all documents that have resource identifier 'XX' and then update the path and name field to be your folder Test2/[%Current Item:Name%]. Then you need to also erase the resource identifier on the document so that it doesn't get processed on the next run.

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.