- Power Platform environment with System Administrator access.
- PowerApps license.
- Copilot Studio license.
- Privilege to grant admin consent for tenant in an Azure App Registration.
- Access to create a SharePoint site.
- Backend services of this accelerator must have been deployed already.
- Download PowerPlatformClient.zip file from the
Client
folder of this accelerator. - Download the 'CSRD Disclosure Details' excel file from the
Client
folder of this accelerator.
This solution will include the below components whose setup will be covered step by step in the below sections-
- Gen AI SA PowerApp.
- Power Automate flows.
- Custom Copilot.
- SharePoint Site (the site will not be deployed from the solution but will be needed). More details in the section below.
This will be a completely manual step as the Power Platform solution does not include a SharePoint site. This site is needed to store documents from the frontend then send it to the backend for being levergaed to create Benchmarks & Gap Analysis reports.
- Go to (https://.sharepoint.com/) and click 'Create site'.
- Select Team Site.
- This SharePoint site will need SharePoint List (for storing sustainability reports), a SharePoint document repository (for storing AI generated output reports) and the out of the box Document library for storing an Excel file that comprises of data needed by the API depending on the selected disclosure during record creation.
- Upload the 'CSRD Disclosure Details' excel file downloaded from the Data folder in the Document Library.
- Create a new SharePoint document library (https://support.microsoft.com/en-us/office/create-a-document-library-in-sharepoint-306728fe-0325-4b28-b60d-f902e1d75939#ID0EBF=Modern) and name it 'BenchmarkGapAnalysisOutputdocs'.
- This library will store all the output documents and will be used as a knowledge source from the Copilot. Please make sure the 'CSRD disclosure details' excel file is NOT uploaded in this library.
- Create a new SharePoint List (https://learn.microsoft.com/en-us/sharepoint/dev/business-apps/get-started/set-up-sharepoint-site-lists-libraries) and name it 'SustainabilityCSRDReports'.
- In the SharePoint list, add a column for 'Title'(type of column: text), a column for 'Year' (type of column: text) and a choice type column for 'Classification'. The classification choices could be 'Your company name', Competitors etc. Basically all categories/types of Sustainability reports that will be uploaded.
- It is important to avoid any spelling errors for these 3 columns as they are referenced in the Power Automate flows later. Feel free to add more columns as needed.
- After the SharePoint components have been provisioned, it can take around 2 hours for them to show up in Power Automate.
Before setting up any components of the 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 ClientApp zip > Next
- 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.
This solution leverages 7 Power Automate workflows. Please make sure all of them are turned on. If any of them are turned off, click on the 3 ellipsis next to their name> select 'Turn On'.
The Power Automate workflows have 2 main components: backend API URL and SharePoint URL need to be updated in all of them.
- Open the PA-GetAllBenchmarkResults flow.
- Click Edit
- Click on the 'backend API URL' step and paste the URL of the backend Azure services deployed already in the Value field.
- Click Save.
- Repeat steps 2-4 for following flows- PA-GetAllGapAnalysisResults Getalldocumentsfromapi File upload from Sharepoint list to API PA-GapAnalysis PA-Benchmark
- Open the 'File upload from Sharepoint list to API' flow.
- Click Edit
- Update the 3 Sharepoint actions with the SharePoint URL and the Sharepoint list created earlier. You should be able to select the URL from the site address and List Name dropdown in the action.
- Click Save from the top right
-
Open the 'output notification in Teams' flow.
-
Click Edit
-
Update the SharePoint action with the SharePoint URL and the Sharepoint list created earlier. You should be able to select the URL from the site address and Library Name dropdown in the action.
-
Click Save
-
Open the 'PA-Benchmark' flow.
-
Click Edit
-
Update the SharePoint action 'Create File' with the SharePoint URL and the SharePoint output document repository created earlier.
-
Click Save
- Repeat steps 10-13 for 'PA-Gap Analysis' flow.
-
Navigate to (https://web.powerva.microsoft.com/) and select your Power Platform environment which was used to deploy the client solution on the top right.
-
Navigate to the 'Knowledge' section in the Copilot Studio. If there are any existing knowledge sources that exist, delete them by clicking on the 3 dotted ellipsis > Delete.
-
Add a new knowledge source which will be used to leverage your SharePoint site as a source for the Copilot by clicking on 'Add Knowledge' > Click on SharePoint> click on the SharePoint > Enter your SharePoint site URL.
-
Go to 'Topics'> Conversational Boosting. In the topic, find the 'Create Generative answers' node and click on the ellipsis. Check your SharePoint knowledge source configured in steps 2-4 and click Save from the top right as per screenshot below.
- Manual authentication is required for the SharePoint site to be used as a knowledge source. Follow these steps (https://www.youtube.com/watch?v=rw4IwR68Wc0) from a video created by our Product Group of Copilot Studio.
- Publish the Copilot by clicking the publish button.
- Go to Channels> Microsoft Teams> Turn On Teams
- This will enable your copilot for Microsoft Teams and now the Copilot will be able to send notifcations & answer questions around the output documents.
- Publish the Copilot by clicking the publish button.
- In the PowerApps maker portal (make.powerapps.com), go to Apps > GenAI SA App
- In the 'Documents_API' screen, click on the 'Upload document' button
- For the 'OnSelect' property of the button, update the URL to the SharePoint List created earlier. Only update the value inside the " ".
-
In the Benchmark-Create CSRD screen, for the Items property in the 2_1 gallery, update the Classification to your company value you selected in step 1.3.
-
For gallery 2, update the Classification value if you configured something other than "Competitor" in step 1.3. If you configured "Competitor", then no action needed here.
-
Repeat Steps 4 for Gallery 2_2 in Create Gap Analysis screen.
-
This step is only needed if you get the below error when using the powerapp in the Create Benchmark or create Gap Analysis screen.
-
If you see this error, it is due to the excel file privileges. Please delete the excel file from the data section of the PowerApp and reupload the excel file from step 1.1 in the same SharePoint document repository.
-
Save the Power App and click publish from the top right.