How to improve File Approval process to include multiple source libraries

This part III article in the series of adding a file approval action directly to Teams File Tab. Following my earlier posts (How to create an improved Microsoft Teams Files approval process using Azure Logic Apps and  How to: initiate a document approval directly in team files tab (using Power Automate) ) this one adds multiplexing: the same Logic Apps can get used to take action for multiple document libraries. This change can be also done using Power Automate Premium version since the logic for extracting the extra parameter is the same as with Logic Apps.

You start by adding an extra parameter to column formatting. It is a static value and you set that to each document library – you will get all the rest of file information from the file after you fetch it’s details. This will help you to target the retrieval for the correct Site / Document Library.

I simply put a descriptive name as one parameter we can get. In this example it is SourceDocLib=PlatformCompanyDocuments

Then to the Logic Apps I added a parameter Source and fetch it’s data

Then you just use the Switch or some other way to multiplex the request for actions – fetching file information and writing the approval request to a suitable list.

As can be seen I also renamed some actions between these screenshots and also added one more check there: in case the FileID can not be retrieved the flow terminates (to be done: add logging).

The benefit of all this that you need only to maintain a single Logic Apps in the Azure and you can add multiple document libraries for this approval process.

2 thoughts on “How to improve File Approval process to include multiple source libraries

  1. Thank you for a great article.
    Would it be possible to dynamically get the path instead of having to manually enter the location?
    I ask this because i would like to use the same flow on all lists, without manually having to maintain the SourceLib variable on each list. Just lie you are able to fetch the ID of the file?

    What I refer to is something like this:


  2. In this example there is only Logic Apps and Flow. You have to edit the column formatting to each doclib separately any case – that is the spot to make it easy and simple solutions are usually the best. I can keep on digging if there is some ID that would be usable.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.