Workflows can fail for a variety of reasons, anything from communication issues with external systems, incorrect data, workflow logic, all the way through to unexpected workflow engine failures.
However, regardless of the reason for the failure, the most critical factor is that when it happens, someone is notified, and the cause is identified.
In Nintex for Office 365, we fully understand that identifying when a workflow terminates or suspends has been extremely challenging due to the lack of any kind of notification or indication that something went wrong.
There are numerous factors as to why we’ve not been able to provide this capability; however, let’s not dwell on the past. The Nintex team is extremely excited to announce the introduction of Workflow failure notifications, which, as the name suggests, is the ability to configure workflows to send email notifications when it fails!
I’m sure after reading that, you are clapping and cheering or at least have a smile on your face ?
This capability is currently the second-highest requested feature on uservoice with 641 votes, so we’re pretty delighted we can now tick it off the list.
Let’s dig a little deeper into the feature to understand how it works and what you need to do to start receiving alerts.
New publish dialog settings
The publish dialog has been updated to include two additional settings:
Workflow owner – we understand you don’t always want to send notifications to the person who last published the workflow, especially when it may have been a partner or someone from IT. To cater for this scenario, we’ve added a new workflow owner field allowing you to add one or more users, anyone added will receive the email notification (if option selected below).
Productions workflow failure alerts – as the label suggests, notifications are only sent for production workflows, if a workflow has an assigned use of ‘Development’ and you want to receive notifications then it will need to be updated to ‘Production’ and re-published. This new setting allows you to decide who should receive the notification, you have the option of the user who last published the workflow, users added to the workflow owners field or both.
Note: you must choose at least one of these options and republish the workflow before any notifications are sent.
Notifications
The email notification and the sending frequency depends on when we process your tenant and detect failures. To best monitor the workflows with minimal resource usage on your SharePoint tenant, we don’t process all your tenant’s sites at once. Instead, we spread them out over the course of the alerting window. What this means is that workflow owners will receive alerts at different times for workflows that are on different sites. However, each site’s emails will be delivered at roughly the same time each day.
The way we process failures means that the notifications aren’t sent instantaneously every time a workflow fails, the maximum time between when the failure happens, and when the notification is sent should be approximately six hours (less is many scenarios). We understand this isn’t ideal. However, we do this to stay inside the SharePoint Online resource limits and avoid causing disruption to your workflows or other SharePoint operations.
As we roll this feature out and monitor its success, we’ll assess whether we can bring the alerting time window down so that there is a shorter possible wait between a workflow suspending and the owner receiving the email.
What's in the email?
The notification email will provide you with all the necessary detail to track down the cause of the failure. We send two different emails, depending on the type of workflow.
For a site workflow we provide:
- The name of the workflow, including a link to the SharePoint workflow gallery page (list of all site workflows and instances).
- A listing (max 100) of all failed workflow instances during a period, as we process in blocks, there may be multiple workflows that fail within the time period.
- For each instance, the date and time it failed with a link to the SharePoint instance details page and the initiator of the instance (email address only).
- User who last modified the workflow.
We provide very similar detail for a List workflow; however, the main difference is the name of the workflow links directly to the list.
Here is a list workflow notification example.
Capture and store all failed notifications in a central location.
Even though we don’t provide a centralized location to store and track all your failed workflows, we’ve come up with an option that may be suitable if you have the need.
Integrate with Microsoft Teams – every channel in Teams provides a unique email address, and we can cleverly use this address to capture and store the notification.
- Create a new Team, maybe something like ‘Nintex Workflow Tracking’ and add a new channel called ‘Workflow failures’
- Right click on the channel and select ‘Get email address’
- Copy the email address
- Open the workflow and add this address to the ‘Workflow owners’ field (you can have any email address).
- Publish
Now when the notification is sent, it will not only send a new email to the channel (including a Team notification). It will also store every email into the default document library (Email messages folder) for the channel in SharePoint (as shown below).
As a final bonus, because the email is now in SharePoint, you could then create a Nintex Workflow to create a process to manage the fixing of the workflow (of whatever process you require to handle the failure).
Note - this is gradual rollout and may not appear in your tenant until around the 20th January 2020.
We hope you enjoy this new capability of would love to hear any feedback, feel free to email me at rick.demarco@nintex.com.