Dynamic Approvals in Power Automate SharePoint List based Approval Tutorial

Dynamic Approvals in Power Automate SharePoint List based Approval Tutorial Hello everyone raza here in this video i will show you how you can create dynamic approvals in power automate by leveraging a configuration list in sharepoint.

The list will drive the approval pattern of your power automate workflow patterns like is approval required is manager approval required who the approvers are depending upon specific criterias.

So let's check this out in action we will create an approval process that is based upon an approval matrix the approval will be dynamic based upon.

The metadata that the user enters in the system let's take an example of a service desk sharepoint list here when the users create a request on.

The system they pick a request type for each of these request types i want to dynamically define who my approvers are some request types i do not need an.

Approval for some request types i need a manager's approval and the approvers are different for each request type for scenarios like these it is best to create something known as an approval.

Dynamic Approvals in Power Automate SharePoint List based Approval Tutorial

Matrix i'll create a list called approval matrix i have my title column which would have.

All my request types in here i'll add a column type yes no i will call this approval required default i'll keep it as yes i'll add another column again of type.

Yes no manager approval needed i'll add a choice column approval type first to respond.

And everyone must approve by default i'll keep a desk first to respond and then a column where i can define my approvers i'll pick the person type.

Column call it approvers you can even allow the user to enter groups here i'll click save that completes my matrix now i'll head over to the grid view.

And start adding all my request types for each of these request types i can decide whether i want approval or not maybe for stationary requests i do not want any approval.

Posts Related:

    And the manager approval is only needed

    For business cards not for the others for computer related issues i want every approver that i define here to say that.

    The item is approved and then finally here i can plug in who my approvers are business card requests goes to james this column which is of type person i.

    Can also make it to allow multiple selections so if required i can add multiple approvals as well for example computer issues they go to james.

    And sarah you can even plug in mail-enabled group email addresses and that completes my approval matrix.

    Now we need to build a flow that respects this approval matrix and the beauty of this process is if we ever need to make a change all we have to do is come here and change the matrix.

    In power automate we'll start with an automated cloud flow when an item is created in my sharepoint list i've connected to my sharepoint list.

    Whenever an item is created in this list the user has to pick the request type and in my approval matrix i have those same request types based on which i need to define my approval pattern.

    So the first step would be to query the approval matrix to get this information to do that i will use the get items action connect to the approval matrix list.

    I need to apply a filter query here i need to query the approval matrix the title column has the request type information so my query would be title equal to.

    Under single quotes

    I need the dynamic content property of request type and that if i search for request.

    Request type value now even though i know that this query will return one row from the approval matrix the get items action will return an array.

    I want to only work with that one record so what i will do here is i will add a simple compose action that i will rename to approval info.

    And the input here would be the expression first off i will go to dynamic content and give it the property value coming from the get.

    Items action in my service desk i have an approval status column that tracks the status of the approval and i have my approval commands multi-line.

    Column the first thing to do is to check whether approval is required or not based on the request type and that information will be held in this approval info object.

    I will add a condition i will rename this condition to approval required here i will write an expression outputs of.

    This action which is called approval info and from this i need the approval required column information.

    So i need the internal name of the column from sharepoint and for that i can simply sort this column and in the url i will get its internal.

    Name in the property called sort field so i've just grabbed the internal name of this column i will plug that in right here this column is of type yes no so it will.

    Return boolean results of true or false so i need to check whether this is equal to the expression true if it is not equal to true that means no approval is required and.

    If that's the case then i want to automatically set the approval status to approved it's auto approved and to do that in the no branch.

    I will update my item and in here i will change the approval status to approved and the comments would be auto approved by system.

    Now in case that approval is required my next step would be to check whether the manager approval is needed or not so in the yes branch since we are going to have a lot of.

    Branching logic it's much more readable if you create scopes so i'll add a scope action first this i will rename to.

    Manager approval the first step will be to check if manager approval is required or not and for that i will write the expression.

    That connects to the approval info object and here i need the manager approval needed columns internal name so i'll just sort.

    This and break it from sort field plug it in right here if this is equal to true.

    That means managers approval is needed i will get the user's manager i will update the status of the approval to pending manager approval i've plugged in the approval commands.

    And now i will start and wait for the approval for my manager i've plugged in the details of the approval now i'll add a condition.

    To check to see if the outcome of the approval is approved if it is then i will change the approval status.

    To pending approval since it will go to the main approvals i'll put the comments that the manager has provided and if the manager has rejected i'll set.

    The status to rejected and plug in the commands after the manager's approval would be the main approval action that gets assigned to my approvers.

    So i need to ensure that the manager approval was approved before i go to the next approval i'll initialize a boolean variable set it to true.

    If the manager approval was rejected i will set that variable to false and if the manager approval is not needed.

    I will set the status to pending approval now after my manager's approval i will add another scope this will be my main approval.

    Which will only begin if that variable has the value true i need my approvers.

    Who are in this person type column now the approval action only expects the email addresses of the approvers semicolon separator i will add.

    A select data operation from my approval info object this time i need my approvers column i'll plug in its internal name.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continuetomake videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=R18_qYVPWl4
Previous Post Next Post