Copy SharePoint Workflows From One List To Another

Copying a SharePoint Workflow from one list to another is not in-the-box functionality, but with a little copy and paste, you can get a bit of reusability out of those workflows you’ve created.

In SharePoint Designer, ensure you have a valid workflow to start with. Let’s call it our “Base” Workflow.

  1. In SharePoint Designer, open your website
  2. Select File – > New Workflow
  3. Now we create a “shell” workflow that uses your “Target” list.
  4. The shell should have at least 1 step and 1 rule. (Create and set a Workflow Variable for ease)
  5. Click Finish.
  6. From your “Base” Workflow, open the rules file (xxx.oxml.rule) in NotePad, where xxx is the name of your Base Workflow. As you can see below, I have “Set Item Defaults – Utility”.
    Workflow-Files
  7. Select All and Copy to the ClipBoard. Close the file.
  8. Open the xxx.oxml.rule file (again, where xxx is the name of your Workflow)  file for your Target workflow in NotePad
  9. Select All and Paste from the ClipBoard. Close and save the File.
  10. In the Base Workflow, open the xxx.xoml.wfconfig.xml file.
    Workflow-Config
  11. Locate the ListID node. Copy that long GUID into NotePad. Make a note, that will be the OLD value. We will “Find” this later.
  12. Select the node attributes StartManually, StartOnCreate and StartOnChange and their values. Copy to the ClipBoard.
  13. Close the File.
  14. In the new Target Workflow, find the file xxx.xoml.wfconfig.xml and open it.
  15. Paste the values for Start (Manually, Create, Change) here in the section inder TaskListID.
  16. Locate the ListID node. Copy that long GUID into NotePad. That will be the NEW value. We will “Replace” this later.
  17. Close the file.
  18. In the Base Workflow, open the xxx.xoml file in NotePad.
  19. Select All and Copy to the ClipBoard. Close the file.
  20. In the Target Workflow, open the xxx.xoml file in NotePad.
  21. Select All and Paste from the ClipBoard.
  22. Now open the other NotePad with our OLD and NEW value.
  23. In the Target xxx.xoml perform a Find & Replace using the OLD GUID and the NEW GUID as your values. We are changing all references here from the Base Workflow List to the Target Workflow List.
  24. Save and Close the file.

With that last step, the workflow has been saved and deployed to the list. But if you want to double check, feel free to open it up with the Workflow GUI.

About the Author