Solution Overview
Components:
Get the solution
PowerApps makes the process of viewing and selecting text to redact easy for the user:
Once the document is redacted, PowerApps displays it to the user.
In your Azure subscription you’ll need to create a new resource group (or use an existing one) that will hold the Azure function. This will set up all the necessary components you need, specifically the Endpoint to invoke the service and key to authenticate properly. I created a new resource group on Azure to contain all the components we’ll need.
The core of the solution resides in Power Automate. Activities can be configured to send the document and selected text to be extracted to the Azure function and then add the redacted document back to the document library, all initiated by the Redact button in PowerApps by the user.
Power Automate core activities
Let’s break down each activity in Power Automate to understand what’s going on.
Initialize and set a variable representing the phrase to redact. This will be passed from PowerApps representing the text selected by the user.
Using the compose activity in PowerAutomate, it’s critical to convert the content of the file to a base64 binary format. The Azure function needs this format to process the PDF properly.
A few things to consider when calling the Azure function:
Create a new file in SharePoint using the redacted file returned by the Azure Function.
As part of this solution, I have created an Azure function that will need to be deployed to the resource group created earlier. Download the Visual Studio solution from GitHub and deploy it to a resource group in Azure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.