In the previous post, I covered the infrastructure necessary to support a Power Automate flow for disposition based on document location.  In this post, I’ll cover the main components of the flow and describe the process.

Power Automate Flow for Disposition Based on Document Location

Disclaimer: I will skip over the flow basics, such as variables. While important to any flow, it is not key to what I will cover. And every developer\organization has a preferred method.  I’m just trying to cover the key components that make up the overall solution.

Flow Process Overview

The flow will follow this process:

  1. Trigger when content is up for disposition
  2. Use details from the trigger to gather the correct information from the cross-reference list
    • Label ID
    • Site URL
  3. Determine if all approvers will be necessary for the content to be disposed
  4. Loop through the approvers found as there could be multiple and add to a list
  5. Send an approval to the approver(s) and await their response.

Trigger when Content is up for Disposition

This step is pretty straightforward.  It’s the activity selected as the trigger to the workflow: “M365 Compliance – When an item reaches end of its retention period”

Power Automate Flow for Disposition Based on Document Location - Workflow Trigger

Use Trigger Information to Locate Corresponding Cross-Reference List Item

Once the flow is triggered, it will gather necessary information from Purview, such as the document information, location, label ID, site URL, etc.  This information will perform a list search on the SharePoint List.  The action will be a SharePoint Get List Items.  There should be only one item with the values to be searched for, and so the query will be limited to the first value returned.  Additionally, the action will include a query that searches the list for the label ID and the URL of the site the document exists within.

Power Automate Flow for Disposition Based on Document Location - Get Cross Reference Item Using Trigger Data

Determine if all Approvers will be Necessary for the Content to be Disposed

This step will need to be wrapped in a For Each loop because the flow can’t tell there is only one value coming back.  For this, if multiple approvers are required, I just set a variable I initialized with a false value earlier in the flow.

Power Automate Flow for Disposition Based on Document Location - Determine if Multiple Approvers Required

Loop Through the Approver List to Gather All Approvers

Next, we want to build a string of approvers for the disposition.  For each user that is listed as an approver, append to a string with a trailing semi-colon.

Power Automate Flow for Disposition Based on Document Location - Append Approvers to String

Send Approval Request to Disposition Approvers

The final step in my example is to determine if the flow needs to wait for all approvers or take the first approval\rejection and sent out the appropriate approval message.  You’ll note that I don’t have anything in place to handle if a user rejects the disposition approval request.  I leave that up to your own internal process.

The Finished Flow

The Finished Flow

Thanks for reading!