In SharePoint Online, the Automatic Workflow Clean-up is set to 30 days and cannot be turned off or modified. I need to retain this workflow history information for auditing purposes.

Is there a way to export out this information possibly every 7-10 days? I know that there is a hidden Workflow History, but it has no association to the item.


The Workflow History list is a standard list like any other. ....../Lists/Workflow%20History is the default, though workflows can use whatever history list they want of course.

I checked my online SharePoint and it looks like the structure is the same as our on premises SP2013. There's a List ID, which is a GUID, and there is a "Primary Item ID" field that lists the ID of the item. It's an integer with an internal name of "Item".

You should be able to write REST code or Powershell code, or even SharePoint Designer code to be able to grab the information and write it to another list. It would be a chore since you'd have to figure out what guids belong to what, but it looks doable.

The other fields in the history list

 Modified                           Date and Time   
 Created                            Date and Time   
 Event Type                         Event Type   
 Workflow History Parent Instance   Single line of text   
 Workflow Association ID            Single line of text   
 Workflow Template ID               Single line of text   
 List ID                            Single line of text   
 Primary Item ID                    Integer  
 User ID                            Person or Group   
 Date Occurred                      Date and Time   
 Group Type                         Integer  
 Outcome                            Single line of text  
 Duration                           Number  
 Description                        Single line of text  
 Data                               Multiple lines of text  
 Created By                         Person or Group   
 Modified By                        Person or Group  
| improve this answer | |
  • Thanks for your response. I see the columns you have listed here in the Workflow History List Settings, but I don't have any type of List ID or Primary Item ID in the list I'm trying to associate it with. Currently the columns for Primary Item ID and List ID are blank. – cbbrown Apr 25 '17 at 14:54
  • 1
    I looked at a few of my history lists, and I see that there is no list/item ID for workflows that use the 2013 engine. Which kind of makes sense, because they run 'outside' of SharePoint in the Workflow Manager. That's also why you don't see different versions of a workflow when you publish (if you're looking at workflow settings in the browser). About the only way you might be able to log information you need would be to always log the list name and id as one of the first steps of your workflow - that would be written to the history list. – Robin in Or Apr 25 '17 at 19:57

The Workflow History List is hidden list but you can access from the URL. I have a Workflow History list in a site I can access

<<site url>>/Lists/Workflow History/AllItems.aspx

You will see the list with items

enter image description here

The list will have default "Export to Excel" option.

If you want to automate this process create a Task Scheduler using Powershell or CSOM and store the file into your preferred location.

| improve this answer | |

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.