Read Receipt of Documents from SharePoint

Tags:

Have you ever wondered how to track whether employees have read crucial documents? I faced this exact challenge in a past project. The client needed to distribute compliance documents from a document library to specific employees and keep a record of these documents being read in their training record spreadsheet.

To solve this, I developed an “Instant” Power Automate flow. This flow can be triggered by a user on a specific document, sending an adaptive card to the employee(s) via Microsoft Teams. The card prompts them to open and read the document, then click “Read” to log this action in a spreadsheet.

Steps to Implement:

1. Browse to https://make.powerautomate.com

2. Select Create from the left hand menu

3. Select Instant cloud flow under the start from blank menu

4. Select For a selected file and enter a sensible name of the flow, for this example I’ve named mine: Read Request & Receipt of Important Documents, followed by clicking Create.

5. For the the 1st action of “For a selected file”, select the site address and the document library of where the important documents are stored. The input should be an email address.

6. Add another action of Get file properties, select the site address and the document library as per the previous step, also select ID using the get data from previous action.

7. Add the next action of a Compose, and add the Email field from the For selected file action.

8. Add the next action of Get user profile (V2), the Office 365 one, add the User email which is the person who triggered the flow email address.

9. Add an apply to each action and add the following expression into the select an output from previous steps: split(outputs(‘Compose_2’), ‘;’)

The next steps are all inside the Apply to each action:

10. Add the action “Post adaptive card and wait for a response

  • Post as: Flow bot
  • Post in: Chat with Flow bot
  • Message: Enter the following json text, please note change the URL for the logo and necessary text as appropriate (Please note the text highlighted in bold, will need be replaced with the specific data from the relevant action):
    • {
      “$schema”: “http://adaptivecards.io/schemas/adaptive-card.json”,
      “type”: “AdaptiveCard”,
      “version”: “1.4”,
      “body”: [
      {
      “type”: “Image”,
      “url”: “https://alexwithers.co.uk/wp-content/uploads/2023/09/AWColour-Logo-Background-Transparrent.png”,
      “size”: “Medium”,
      “horizontalAlignment”: “Center”
      },
      {
      “type”: “TextBlock”,
      “text”: “Action: Read Important Document”,
      “size”: “Large”,
      “weight”: “Bolder”,
      “wrap”: true,
      “horizontalAlignment”: “Center”
      },
      {
      “type”: “ColumnSet”,
      “columns”: [
      {
      “type”: “Column”,
      “width”: “stretch”,
      “items”: [
      {
      “type”: “TextBlock”,
      “text”: “<<Display Name>> requires you to read an important document, click on the button below to read the document:”,
      “wrap”: true,
      “horizontalAlignment”: “Center”
      }
      ]
      }
      ]
      },
      {
      “type”: “ActionSet”,
      “actions”: [
      {
      “type”: “Action.OpenUrl”,
      “title”: “<<Name>>“,
      “url”: “<<Link to Document>>“,
      “style”: “positive”
      }
      ],
      “horizontalAlignment”: “Center”
      },
      {
      “type”: “TextBlock”,
      “text”: “When you have read the document, please select the \”Read Confirmation\” button.”,
      “wrap”: true,
      “horizontalAlignment”: “Center”
      },
      {
      “type”: “ActionSet”,
      “horizontalAlignment”: “Center”,
      “actions”: [
      {
      “type”: “Action.Submit”,
      “title”: “Read Confirmation”,
      “data”: {
      “policyTitle”: “<<Name>>“,
      “userName”: “”,
      “confirmationStatus”: “Confirmed”
      }
      }
      ]
      }
      ]
      }
  • Recipient: Select Current item, this is to ensure that if multiple email addresses are selected that they will all receive the message.

11. Add the action Get user profile, add the body action in the User (UPN field).

12. Add the action Add a row into a table:

  • Location: Select the SharePoint site where the training files will go
  • Document Library: Select the document library where these documents will go
  • File: Enter the path of where these documents will go, in this example this is what the path will be – /Employee Files/<<Display Name Action – Office 365>>/Training/Important Document Tracker – <<Display Name Action – Office 365>>.xlsx (Please note when using this action, the spreadsheet needs to already exist otherwise it will not complete)
  • Table: Enter DocumentReadConfirmation
  • Row: Enter the following expression:
    • {
      “Document Name”: “<<Name>>”,
      “Employee Read Confirmation Date”: “<<Add expression the utcnow()”
      }

13. Now you can browse to the document library, select the document and send it off to the employee(s), by selecting Automate from the navigation menu, followed by selecting Read Request & Receipt of Important Documents.

14. Enter the email address(s), of the people you want to send the read receipt to, followed by selecting Run flow

The employee will now receive a notification similar to the below in their Teams messages:

Once they have selected Read Confirmation, it will add a new row to the spreadsheet:

Comments are closed