The Workflow History List is a particular type of list in SharePoint. In terms of structure and functionalities, it is a normal list in SharePoint, nothing special, but it has the following particularities:
- It's used only by the workflow engine to log all the activities of the running workflow instances.
- By default, the logs are only kept for 60 days to avoid problems with the number of items limit in the list and also for performance reasons
- Every site has, out of the box, a Workflow History List.
- It's a hidden list, so don't worry if you don't find it in under Site Contents. You can manually navigate to it via https://[YOURSITE]/lists/Workflow&20History
- Cannot be created manually in O365, you will not find it as a template in your site.
If you've worked with SharePoint workflows or Nintex for a little while, you'll probably have seen or read in some article of this community that, as a best practice, we recommend use more than one Workflow History List in your site. Reasons being are performance and better visibility. The purpose of this post is not to explain these reason, but if you're interested I'd suggest having a look at some of these articles:
With all of that in mind, the problem we've got now is that in Office 365 there's no way to create a Workflow History List manually, from the SharePoint user interface. The only options (that I know) to do it are:
- From SharePoint Designer
- Using Powershell
And here is another way of creating a new Workflow History List: from a Nintex Workflow.
The Workflow History list is, after all, a SharePoint list so there must be a template list that SharePoint uses. Actually, if you have a look at the List Template Types table provided by Microsoft, you'll see that the Workflow History is listed in there, using the Template ID = 140. And that's all we need.
Now, have a look at my previous post on Using the Office 365 REST API to create lists from you Nintex Workflow and use that workflow design to create your Workflow History list. The only thing you need to do is to modify the Request Body and change the BaseTemplate value to 140. Like this:
And that's it. Run the Workflow and you'll get a new Workflow History List right away. You can use this workflow on demand, on a site or a list workflow, or you can include this workflow as part of a bigger provisioning Workflow that is in compliance with your Governance strategy. Whatever the case is it would be easier than using SharePoint designer or Powershell.