Summarise a document with Power Automate
Complete guide, demonstrating how to summarise Office Documents using Power Automate.
Last updated
Complete guide, demonstrating how to summarise Office Documents using Power Automate.
Last updated
In this example we’ll be achieving the following objective with a fictional organisation named “10docs Ltd”, a large retailer.
Produce a summary of any document saved into a SharePoint Document Library which contains the documentation that supports a Board Meeting. The summaries will be sent around to all board members in advance of the meeting.
The email should look something like this:
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:
SharePoint for Document storage
Tendocs for summarising the documents
Outlook for sending the email
If you need any help along the way, feel free to reach out to the support team.
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.
Create a new Document Library in a SharePoint Team Site.
Open the Document Library, and then add a new multiline column called "Summary"
Then go to the Power Automate home page.
Create a new Flow “Instant Cloud Flow”, and then complete as follows.
To the Flow add the "Initialize Variable" action. This will hold each of our summaries.
Add a "Get Files (Properties Only) action. This will retrieve all the documents in the document library.
In the next step we will retrieve each file from the Document Library using the "Get File Contents" action. When you select the identifier from the earlier step, Power Automate will automatically add a For Each loop.
Once we have the file contents, we can send it off to Tendocs for a summary. Add in the Tendocs Summary action.
We are going to now add the summary to the variable we created earlier. Add in the "Append Array to Variable" action. This step does require some basic JSON formatting of the content.
The loop will create the array we need, next we need to format it appropriately for inclusion in an email. We can do that with the "Create HTML Table" action.
The final step is the email. Outlook provides a "Send an Email" action. This has all the options you need for sending the email to all the board members. Fill out the "To" and "Subject" fields. While we have a HTML Table ready to add to the body, to ensure the links work we need a little tweak. Add the following function to an expression block:
All the pieces are now in place, all that is left is to test the new flow.
After saving the Flow, click on the “Test” button, select “Manually” for the trigger, and then click “OK”. You may be prompted to check or create connections, where you can “Continue” and then “Run Flow”.
After a short period of time, the Flow should complete successfully, and you will find an email sitting in you inbox that looks like this:
In an earlier step we added a new Column to the SharePoint Document Library called "Summary". We can add the summary of each document into that column by adding an "Update File Properties" action as follows:
The final result is an email containing a summary of all the documents, and a document library that contains an automatically generated summary of each document.
This is just a start, and you can add additional features to do things like:
Automatically generating the summary anytime a document is added to the library by changing the Flow trigger.
Run the Flow on a schedule, so that the board meeting email is automatically generated before board meetings, and include any documents added since the last meeting.