SharePoint 12 min read

Turn a SharePoint Document Library Into an App With HTML Views and Autofill

126 documents nobody had read, and one screen that shows where the risk sits. How I set up the library, got autofill to read every file and had Copilot in SharePoint build the views on top.

Key takeaways

  • An HTML view on a SharePoint document library can only show what's in the library's columns, so the answers locked inside the files have to become metadata first.
  • Autofill columns ask every document the same questions and write the answers into columns. Spot-check a sample against the documents before you build anything on them.
  • In my build, autofill wouldn't start with folders selected. A view set to show all items without folders let me select every file at once.
  • Build one HTML view per question, refine each one with follow-up prompts, then combine them into a single tabbed view.
  • The views read the library live. When six late documents landed in my demo, revenue at risk moved from $37.8m to $44.6m without anyone touching the view.

You can turn a SharePoint document library into a small app by doing two things in order: use autofill columns to pull the answers out of every document into metadata, then have Copilot in SharePoint build HTML views on top of those columns. The views become the interface, with cards, charts, a heat map you can click and tabs, sitting right inside the library.

I built one for a due diligence data room: 126 documents for a made-up company called Harbourline Logistics, all sample data, with us on the buyer’s deal team. Nobody had read a single file, and the finished view showed that 53% of the company’s revenue could walk out the door the day it’s sold: $44.6m of its $84m, with customers who can terminate on a change of control. It also flagged 20 documents as High risk and 45 expiring before 1 March 2028.

Before you start

  • Copilot in SharePoint. You build HTML views through Copilot in SharePoint, so the person building them needs a Microsoft 365 Copilot licence.
  • HTML views in your tenant. They’re still rolling out. If Dashboard isn’t under Add view, the feature hasn’t reached you yet.
  • Autofill columns. If you haven’t used them, start with my guide to SharePoint autofill columns.
  • The view basics. SharePoint HTML list views covers how to create one, and the multi-tab view guide covers tabs and fixing a change that won’t apply.

Why does a document library need columns before it can have a view?

A list keeps its information in columns already. A document library mostly doesn’t. The expiry date, the change of control clause and the liability cap are all inside the files, and an HTML view can’t read inside a file. It reads columns.

So the design starts with the questions the deal team needs answered, and each question becomes a column.

Question Column Type
Can this customer walk away if the company is sold? Change of control Choice: Termination right, Consent required, Notice only, None found
What runs out soon after the deal? Expiry date, Renewal option Date, Choice
Where are we exposed? Liability cap, Exclusivity or non-compete, IP ownership Choice
How worried should we be? Risk rating, Red flag summary Choice, Multiple lines of text
What do we ask the seller? Question for the seller, Documents referred to Multiple lines of text

All of those are autofill columns: 18 in total, each with its own prompt. Change of control, for example, asks: “Does a change in ownership or control of Harbourline let the other party terminate, require their consent, or require notice?” Use a choice column wherever a view will group, filter or count, so every document lands in one of a fixed set of values.

A few columns stay manual. Section holds the data room folder as metadata, a Customer lookup pulls each customer’s annual revenue from a separate Customers list, and Review status lets the deal team mark what they’ve cleared.

Step 1: Have Copilot write the library schema, then build it

I didn’t create 22 columns by hand. Copilot wrote the whole design as a Markdown file from my description of the scenario: the site, the Customers list, the folders, every column with its type and choices, and the autofill prompt for each.

With that file selected, I asked Copilot in SharePoint to review the schema, raise any questions and build nothing until I approved. It raised none, and once I approved it built the library with every column, choice and autofill prompt in place. Asking for a review first is a habit worth keeping. It’s your chance to catch a misunderstanding before 22 columns exist.

Keep the schema file once the library exists. It’s a plain record of what the library is for and what each column means, and you can hand it to Copilot again to build the next one.

Step 2: Run autofill on files that sit inside folders

The seller’s documents arrived in eight folders, from 01 Corporate to 08 Insurance, and I uploaded them as they were. Then I hit a snag: with the folders selected, the autofill option wasn’t available. It only appears when you select files.

The fix was a view with no folders in it. In library settings, create a new view based on All Documents, and under Folders choose Show all items without folders. I called mine No folders. Every file shows in one flat list, so you can select them all and choose Autofill.

Autofill then works through the files in the background. Give it time on a library this size before you build on the results.

Step 3: Spot-check before you trust the answers

Autofill reads documents well, and it still needs checking. I grouped the library by Change of control, picked a document marked Termination right and found the clause. It matched.

Grouping is also where the surprises show up. Eight insurance policies came back as Termination right. I’d written them expecting Notice only: each policy says the insured must report a change of control within 30 days, and the insurer may then cancel on 30 days’ notice. Autofill’s reading is defensible, so I kept it. Those policies aren’t customer revenue, though, so later I had the Change of control view split that group into customers and other contracts.

Check a handful of documents per column, including any you already know the answer for. If a column keeps missing, fix its autofill prompt and run it again before any view depends on it.

Step 4: Fill the gaps Copilot can fix in bulk

Part way through, I noticed the Section column was blank on every document. I’d uploaded folders, and the folders hadn’t set the column.

Copilot in SharePoint fixed it with one prompt (this isn’t an autofill column, so autofill couldn’t): set Section on each document to match the folder it’s stored in, and tell me how many documents you updated per folder. It asked for approval before changing anything, ran the update as a batch, and came back with a table of counts per folder, 120 documents in total. Default column values on each folder would have set it at upload.

The Questions for the seller view later grouped its 94 questions by Section, and it could only do that because Section was now a column.

Step 5: Build one view per question

I built five views, one at a time, each answering one question for the deal team. Every prompt followed the same shape: the view’s name, who it’s for, which documents count, what goes across the top, and what goes underneath.

View What it shows
Deal summary Four cards (documents, High risk, revenue at risk, expiring soon), documents by risk rating, the High risk table
Change of control Termination right, Consent required and Notice only groups, with the revenue at stake
Expiry cliff A month-by-month timeline to February 2028, coloured by renewal option
Red flags A heat map of Section against clause type; clicking a cell filters the cards below
Questions for the seller Two tabs: every question to send, and the documents referred to that need checking against the room

Here’s the first prompt in full:

Create an HTML view called "Deal summary" for a deal team buying this company.

Use every document in the library, including the ones inside folders.

Across the top, show four cards: total documents, documents rated High risk, the total Annual revenue of customers whose Change of control is "Termination right", and the number of documents with an Expiry date before 1 March 2028.

Under the cards, show a bar chart of documents by Risk rating, and a table of the High risk documents with Name, Counterparty, Section and Red flag summary. Sort the table by Contract value, largest first.

Keep the “including the ones inside folders” line in every prompt on a library. With it, the view counted all 120 documents across the eight folders.

None of the views was finished on the first prompt. On the Deal summary I moved the risk rating chart under the cards as a row of cards and stretched the High risk table full width, then asked for the revenue card to show its share of the $84m. On the Expiry cliff, Copilot stopped to ask whether to include two documents that had already expired. Copilot earned its keep there. It spotted the two lapsed documents and asked, and the call was mine: yes, because an agreement that lapsed without anyone noticing is exactly what a buyer wants to find. Its clarifying questions are where your knowledge of the work goes in, so answer them properly.

Step 6: Combine the views into one tabbed app

I built the views separately to test each one, then combined them for the deal team. The last prompt asked for a single view called Project Harbour with the four cards visible on every tab and six tabs: Deal summary, Change of control, Clause heat map, Expiry cliff, What’s missing and Questions for the seller, with an Open button on every row.

Copilot asked one clarifying question while building it: what counted as a contract. With that answered, the view came back with all six tabs. The heat map behaved differently this time: clicking a cell opens the matching documents in a dialog, with a link to each file. I hadn’t asked for any styling or brand, so the tabs don’t all look alike, and that’s one more round of follow-up prompts.

What happens when new documents arrive?

The views read the library live, so they don’t need rebuilding. Six late documents arrived from the seller, including a deed of variation giving a fourth customer a termination right and a non-renewal notice from another. I dropped them into a 09 Supplemental Disclosure folder.

The document count changed straight away. Once autofill had read the new files, the cards moved too:

Card Before After
Documents 120 126
High risk 16 20
Revenue at risk $37.8m (45%) $44.6m (53.1%)
Expiring before 1 March 2028 43 45

Design the library around a decision before anyone writes a prompt

Copilot built each view in minutes. Most of my time went on the columns and the autofill prompts. Columns first. View second.

Start from the decision the reader has to make, then work back to the columns. A deal team has to decide whether to bid and at what price, so the columns ask which customers can leave and what runs out after the deal. A property team reviewing leases needs different columns, and so does a procurement team onboarding suppliers. Write the questions down first, and only then turn each one into a column.

Treat folders as storage and metadata as the structure. The Questions for the seller view could only group by Section once Section was a column. If you inherit a folder structure, copy it into metadata with folder default values on day one.

Be clear about what autofill is doing. It reads and summarises, and it can rate risk only as well as your prompt defines risk. My Risk rating prompt spelled out what High meant: it could cost significant revenue, block the deal or leave a liability. That definition is a judgement call, so make it yourself and write it into the prompt.

Keep a person in the loop. This build is triage. It tells the deal team where to look first, puts a number on the exposure and gets sharper questions to the seller sooner. The lawyers still read the contracts, starting with the 20 rated High risk. A Review status column, with values like Flagged, Cleared and Question sent, records that someone has actually looked.

The same build suits any library full of agreements. Leases, supplier contracts, insurance renewals and policies all carry dates, obligations and parties you can turn into columns, starting with the three or four questions people ask about them most.

Frequently asked questions

Can autofill run on documents inside folders? Yes. Create the view through the classic library settings: Library settings, Create view, base it on All Documents, then under Folders choose Show all items without folders. Autofill also runs from inside a single folder if you select the files there, so the flat view only saves you doing it folder by folder.

Can an HTML view use a lookup column’s extra fields? In my build, yes. The Customer lookup showed Annual revenue (AUD) from the Customers list as an extra field, and the revenue at risk card added it up for every customer with a termination right. Set the lookup on each customer document yourself: it’s a manual column, so autofill won’t fill it, and a late document without it won’t move the revenue card.

Do HTML views update when documents are added or changed? Yes. In my demo the document count changed as soon as the files uploaded, and the other cards changed once autofill had filled the new documents’ columns. Expect a short delay for any figure that depends on autofill.

Is this a replacement for legal due diligence? No. Autofill summarises what each document says, and the views count and group those answers. They tell you which documents to read first and which questions to send the seller. A lawyer still needs to read the agreements that carry the risk.

Get these in your inbox. Three emails a week.

Practical thinking on organising your information and getting real work out of AI. Subscribers get the free SharePoint Skill course to start.