Skip to content

Latest commit

 

History

History
136 lines (100 loc) · 8.56 KB

File metadata and controls

136 lines (100 loc) · 8.56 KB

Set up Client side

Pre Requisites

  1. Power Platform environment with System Administrator access.
  2. PowerApps license.
  3. Copilot Studio license.
  4. Privilege to grant admin consent for tenant in an Azure App Registration.
  5. Access to create a SharePoint site.
  6. Backend services of this accelerator must have been deployed already.
  7. Download PowerPlatformClient.zip file from the Client folder of this accelerator.
  8. Download the 'CSRD Disclosure Details' excel file from the Client folder of this accelerator.

High level components that will be deployed from the Client solution.

This solution will include the below components whose setup will be covered step by step in the below sections-

  1. Gen AI SA PowerApp.
  2. Power Automate flows.
  3. Custom Copilot.
  4. SharePoint Site (the site will not be deployed from the solution but will be needed). More details in the section below.

Step 1: Create SharePoint Site

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.

  1. Go to (https://.sharepoint.com/) and click 'Create site'.
  2. Select Team Site.
  3. 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.

Step 1.1: Out of the box document library

  1. Upload the 'CSRD Disclosure Details' excel file downloaded from the Data folder in the Document Library.

Step 1.2: Create new Document Library

  1. 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'.
  2. 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.

Step 1.3: Create new SharePoint List

  1. 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'.
  2. 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.
  3. 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.
  4. After the SharePoint components have been provisioned, it can take around 2 hours for them to show up in Power Automate.

Step 2: Import Power Platform Solution

Before setting up any components of the solution, we will need to import the solution in the Power Platform environment.

  1. In the PowerApps maker portal (make.powerapps.com), go to solutions > Import Solution > Browse > Choose ClientApp zip > Next

import power platform solution

  1. 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.

validate components

Step 3: Update the Power Automate workflows

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.

Step 3.1: Update Backend API URL

  1. Open the PA-GetAllBenchmarkResults flow.
  2. Click Edit
  3. Click on the 'backend API URL' step and paste the URL of the backend Azure services deployed already in the Value field.
  4. Click Save.

backend api url

  1. Repeat steps 2-4 for following flows- PA-GetAllGapAnalysisResults Getalldocumentsfromapi File upload from Sharepoint list to API PA-GapAnalysis PA-Benchmark

Step 3.2: Update SharePoint URL

  1. Open the 'File upload from Sharepoint list to API' flow.
  2. Click Edit
  3. 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.
  4. Click Save from the top right

sharepoint url

  1. Open the 'output notification in Teams' flow.

  2. Click Edit

  3. 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.

  4. Click Save

  5. Open the 'PA-Benchmark' flow.

  6. Click Edit

  7. Update the SharePoint action 'Create File' with the SharePoint URL and the SharePoint output document repository created earlier.

  8. Click Save

sharepoint url2

  1. Repeat steps 10-13 for 'PA-Gap Analysis' flow.

Step 4: Update the Copilot Studio

Step 4.1: Update SharePoint URL as the knowledge source

  1. 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.

  2. 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.

  3. 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.

  4. Click Save. copilot studio 1

  5. 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.

copilot studio 2

Step 4.2: Configure Manual Authentication

  1. 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.
  2. Publish the Copilot by clicking the publish button.

Step 4.3: Configure Teams as a Channel

  1. Go to Channels> Microsoft Teams> Turn On Teams
  2. This will enable your copilot for Microsoft Teams and now the Copilot will be able to send notifcations & answer questions around the output documents.
  3. Publish the Copilot by clicking the publish button.

copilot Teams

Step 5: Update the PowerApp

Step 5.1: Update the SharePoint URL in the Document Screen

  1. In the PowerApps maker portal (make.powerapps.com), go to Apps > GenAI SA App
  2. In the 'Documents_API' screen, click on the 'Upload document' button
  3. For the 'OnSelect' property of the button, update the URL to the SharePoint List created earlier. Only update the value inside the " ".

update url

  1. 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.

  2. 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.

  3. Repeat Steps 4 for Gallery 2_2 in Create Gap Analysis screen.

  4. This step is only needed if you get the below error when using the powerapp in the Create Benchmark or create Gap Analysis screen. update url

  5. 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.

  6. Refresh your connection in the PowerApp as shown below. update url

  7. Save the Power App and click publish from the top right.