Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog > Posts > Find Only the Active SharePoint 2010 Workflows in SharePoint Online
July 14
Find Only the Active SharePoint 2010 Workflows in SharePoint Online

Workflow Retirement Series TOC

Part 1 - SharePoint 2010 and 2013 Workflows Kaput in Office 365
Part 2 - Finding All the SharePoint 2010 Workflows in SharePoint Online 
Part 3 - Find Only the Active SharePoint 2010 Workflows in SharePoint Online   
Part 4 - Use PowerShell to Work with SharePoint 2010 Workflow Scan  ​

   ​

In the last episode of “Oh my god, SharePoint Workflows are Going Away!!!” I covered how to find the SharePoint 2010 and 2013 Workflows that might be lurking about in your SharePoint Online environment. As I wrote that blog a big smile crept across my face. I figured this was going to solve everyone’s problem. I assumed I would be cheered as a hero, parks would named after me, the whole thing. Imagine my surprise when the response was, “That’s great Todd, but how can I tell which ones are actually being used?” No directions to the Todd Klindt Celebratory Highway or nothing. Ingrates!

After I dried my tears I did decided that question had some legitimacy to it, so I put pen to paper and wrote this blog post.

I was never much of a workflow guy, either on-prem or in SPO. But in the deep, dark recesses of my mind I did remember an on-prem issue where the “Workflow History List” would get huge and cause database issues. “Workflow History List” sounds promising. I wondered if SPO has such a beast. Sure enough, it does, and it seems to be exactly what we’re looking for.

Like the name suggest, it’s a List of the Workflow History. Since it’s a list it’s a child of a web, or the root web of a site. That list covers the Workflow History of the entire web or site. When you run the SharePoint Modernization Scanner from my previous blog post the ModernizationWorkflowScanResults.csv file lists all the Workflows in your tenant and which site (Columns A and B) that Workflow is in. It also shows when that Workflow was last edited (Column T) but not when it was last used. Fortunately we can take the URL in Column A, tack /lists/Workflow%20history/AllItems.aspx at the end of it and get which Workflows are being executed. Here is what we see in the report:

image 

In my browser I pasted https://m365x541279.sharepoint.com/sites/SalesAndMarketing/lists/Workflow%20history/AllItems.aspx and I got a page like this:

image 

From this I can tell that the “Create Home Schedule” Workflow is being used regularly and I need to find an alternate for it before November 1st, 2020. If a Workflow shows up in the Scan Results spreadsheet, but you can’t find it in the Workflow History List you probably don’t need to rewrite it. However, in the Workflow’s settings it is possible to assign a different list for that Workflow’s history.

image 

Of course you won’t know that unless you look at every Workflow’s settings in SharePoint Designer, which sounds pretty tedious. I was able to whip up some PowerShell that looks for Workflow History lists:

Get-PnPList | Where-Object -Property BaseTemplate -EQ -Value "140" | Select-Object Title, @{Label="URL";Expression={$_.RootFolder.ServerRelativeUrl}}, BaseTemplate

image 

You can run that against the sites that show up in the ModernizationWorkflowScanResults.csv file. If another list shows up there you’ll want to see which workflow is writing its history to that list. By default the Workflow History list is hidden in the UI, so you won't see it in the site's Site Contents page. You can unhide the list in SharePoint Designer, or my preferred method, PowerShell:

Set-PnPList -Identity "Workflow History" -Hidden $false

It’s also important to note that the Workflow History List purges entries over 60 days old. In this case that’s not a problem. Any Workflow that hasn’t been run in the last 60 days probably doesn’t deserve saving.

Look at all the time you just saved! More time to watch hamster videos on YouTube.

tk

ShortURL: https://www.toddklindt.com/FindActiveWorkflows

​​

Comments

Good Work

I guess the next thing would be to iterate those lists and get the "latest" entries from them.
 on 7/15/2020 4:12 AM

Re: Good Work

Thanks, Tony. I don't have a busy Workflow History List to play with, but I agree. Running a bit of PowerShell that lists every Workflow and the last time it had run would be very handy.

tk
Todd O. KlindtNo presence information on 7/15/2020 12:17 PM

Re: Good Work

Thank you, Tony. This is a life saving article for businesses that have too many workflows.
 on 7/28/2020 9:13 PM

Does Sharepoint 2010 Designer workflows

Does SharePoint Designer workflows logs the entry to history list if they don't have 'Log to workflow history' list action added to workflow?
 on 9/17/2020 12:03 PM

Is there PnP PowerShell to get the last time a workflow was run

Hi Todd

Great Article !

Do you know of some PnP PowerShell that lists every Workflow and the last time it had run.

Regards

Nigel
 on 10/15/2020 10:16 AM

Monamaggio

I like to explore myself through games, where I feel confident to win. How about you, have you ever played this game <a href="https://papasfreezeria.io">Papa's freezeria</a>? I think it's quite cool and engaging and I love playing fun games like this.
 on 11/21/2024 8:19 PM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person

Twitter


Want a message when I reply to your comment? Put your Twitter handle here.

Attachments

 

 SysKit