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.

Leave a Reply

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