Compare the contents of two documents with Power Automate

Complete guide, demonstrating how to compare the contents of two documents. In this example, two NDA contracts are compared in preparation for legal review.

Objective

In this example we’ll be achieving the following objective with a fictional organisation named “10docs Ltd”, a large retailer.

Compare an NDA that a third party has asked us to sign with the standard NDA used by 10docs. The differences described should enable the 10docs legal team to more quickly assess if a contract should be signed.

Note: This is a tool to help compare legal documents. It can miss things, and it doesn't constitute legal advice, that can only be provided by a qualified legal practitioner.

The differences should be described like this:

Setup

Power Automate is a growing platform, with an enormous number of first and third party connectors. Tendocs works with them all. To keep it simple, this example uses the following connectors:

  1. SharePoint for Document storage

  2. Tendocs for comparing the documents

  3. Tendocs for creating the document summarising the differences

If you need any help along the way, feel free to reach out to the support team.

Assets

So you can test this yourself, exactly as described here, you can download copies of the sample documents used. Then, to get started, all you need is a SharePoint site with a Document Library where you can upload them.

Preparing the basics

  1. Create a new Document Library in a SharePoint Team Site. This is where 10docs will store their version of contracts (like an NDA).

  1. Create another Document Library in a SharePoint Team Site. This is where 10docs will store the contracts they are asked to sign by third parties.

Create the Flow

  1. Then go to the Power Automate home page.

  2. Create a new Flow “Instant Cloud Flow”, and then complete as follows.

  1. Add the "Get File Contents" action to retrieve the standard 10docs NDA contract.

  1. Add the "Get File Contents" action to retrieve the standard NDA contract provided by the third party.

  1. Now add the Tendocs Compare Documents action, and add the file contents to the action. You can prime the AI for specific scenarios by choosing a profession, in this case "Lawyer".

  1. There are various ways to take advantage of the results of the Compare Documents action. this tutorial will use an excel based template you can download.

  2. To use the template we need to simplify the more detailed results by using a select action, configured as below to convert the results into a flat array.

  1. Using the "Get File Contents" action, get the provided Difference Results template from a SharePoint Document Library.

  1. Using the Tendocs "Create Document from Template" action, configured as follows.

  1. Finally we need to save the output from the "Create Document from Template" action into a SharePoint library.

The Final Result

The final result is an Excel file containing a summary of the differences between the documents.

This is just a start, and you can add additional features to do things like:

  1. Automatically send the document to the legal team where any of the differences have an importance above a certain level.

  2. It doesn't only work for legal contract, but any sort of document. So it can also help where you are working on multiple versions of a document, and simply want to know what is different between them.

Last updated