Fabric usage in this solution is optional. If you would like to use this accelerator without Fabric, please skip this section and make sure the 2 Power Automate workflows (Output doc upload from SharePoint to Fabric and File Upload from SharePoint List to Fabric) are switched off.
- Fabric License
- Privileges to create a Fabric Workspace and a Lakehouse.
- Power Platform Client readme has been completed and deployed.
- Download CompAnalysisFabricsolution.zip file from the
Client
folder of this accelerator.
-
Click on Data Engineering
-
In the left navigation menu, click on Workspaces.
-
Click 'New Workspace'
-
Give a name to the workspace and click Apply. All other fields are optional.
-
In your workspace, click 'New Item' from the top left.
-
Select Lakehouse and give a name to the Lakehouse. Click Create.
-
In the Lakehouse, right click on Files> Properties> Copy the URL. Save this URL which will be used in the next step.
Before setting up any flows of the fabric solution, we will need to import the solution in the Power Platform environment.
-
In the PowerApps maker portal (make.powerapps.com), go to solutions > Import Solution > Browse > Choose CompAnalysisFabricSolution.zip > Next
-
Upon import, all required connections should automatically be established, if any connection is not established automatically, click on the 3 ellipsis and click 'Add new connection. You will probably need to do this for the HTTP with Microsoft Entra ID connector.
-
To do so, click on the 3 ellipsis> Add new connection
-
You will need to enter the Base Resource URL which is the Fabric Lakehouse URL from Step 1.8 and Microsoft Entra Resource URI which for MS Fabric is: https://storage.azure.com. Once both these values are entered> Click Sign In> Import.
-
This will import the Power Platform solution in your environment. To validate everything got deployed, go to the imported solution and the number of components should be the same as below.
The fabric integration in this solution leverages 2 Power Automate workflows. The 1st flow (File Upload from SharePoint List to Fabric) is used to copy the Sustainability reports to Fabric from SharePoint and the 2nd flow (Output doc upload from SharePoint to Fabric) is used to copy the AI generated Benchmark or Gap Analysis Output doc to Fabric. In both Flows, we will need to update the Fabric API URL copied from Step 1.8 and the SharePoint URL.
-
Go to https://make.powerapps.com/ and make sure you are working on the correct environment from the top right created earlier from the DeployPowerPlatformClient readme.
-
Navigate to Flows from the menu on the right and click 'Edit' on the 'File Upload from Sharepoint List to Fabric' flow.
-
On the 3 SharePoint Steps of 'When an Item is created', 'GetAttachment' and 'GetFile', select your Sharepoint Site from the dropdown. In the 'When an item is created' and 'GetAttachment' step, select the SharePoint List you created earlier which is used to upload sustainability reports.
-
In the 'Apply to each 2' step-
- Update the 'Get Attachment content' step with the SharePoint site URL and SharePoint list name where you upload the sustainability reports.
- Update the 'create file' step with the SharePoint URL and the folder path with the document library 'Fabricoutputdocs' created earlier.
- Update the get file metadata step with the SharePoint site URL.
- Update the 'create txt file' step with the SharePoint URL and the folder path with the document library 'Fabricoutputdocs' created earlier.
-
In the fabric API URL step, paste the URL that was copied from Step 1.8.
-
In the 3 'Invoke an HTTP request 4, 5 and 6' steps, also paste the Fabric API URL from Step 1.8 until the "/txtfilename".
-
Click Save.
-
Make sure the flow is switched on.
-
Repeat steps 5 and 6 for the flow 'Output doc upload from SharePoint to Fabric'.
-
For the flow 'Output doc upload from SharePoint to Fabric', update the 3 SharePoint steps by selecting your SharePoint site and 'BenchmarkGapAnalysisOutputdocs' document library created earlier for 'When a file is created' , your SharePoint site and 'Fabricoutputdocs' document library created earlier for 'Create txt file 2' step and only selecting the SharePoint site for the 'Get file content' step.
-
Click Save.