Case Study: Migrating 50,000+ Invoices from M-Files to SharePoint Online

How We Helped a Client Eliminate Licensing Costs and Modernize Their Document Management Platform

Many organizations continue to maintain legacy document management platforms even though they already own powerful alternatives through their Microsoft 365 licensing. Recently, we helped a client migrate more than 50,000 invoices from an M-Files vault to a SharePoint Online Document Library, enabling them to retire their M-Files environment and reduce ongoing software costs.

The challenge was not simply moving files—it was preserving the rich metadata that made the invoices searchable and auditable. By leveraging Microsoft tools such as Power Automate Desktop, Power Automate Cloud Flows, and the SharePoint Migration Tool (SPMT), we developed a repeatable migration process that successfully transferred both documents and metadata into SharePoint.

The Challenge

The client's accounts payable archive contained over 50,000 invoice records stored within M-Files. While the invoices themselves resided on the M-Files server, the business-critical information associated with each document—including invoice numbers, suppliers, amounts, approvers, and dates—was stored separately within the M-Files database and configuration files.

The key requirements for the migration included:

  • Preserving all invoice documents

  • Retaining associated metadata

  • Maintaining searchability and reporting capabilities

  • Minimizing manual effort

  • Leveraging existing Microsoft 365 licensing

  • Decommissioning M-Files to reduce software and support costs

Our Migration Approach

Step 1: Extract Document Metadata from the M-Files Database

The first step was identifying and accessing the SQL database that stored the document property definitions for the M-Files vault.

This database contained valuable metadata such as:

  • Original file name

  • Document ID

  • Invoice date

  • Invoice number

  • Supplier

  • Invoice amount

  • Approver

  • Additional business attributes

We extracted this information into an Excel file, creating a comprehensive inventory that would later be used to populate SharePoint metadata fields.

Step 2: Export M-Files Vault Structure

Next, we utilized the M-Files Administrator tool to execute the Export Structure process.

This export generated XML files containing the supporting data structures used by M-Files, including:

  • Users

  • Departments

  • Value lists

  • Workflows

  • Other metadata cross-reference information

These XML files became an important resource during the metadata transformation phase, allowing us to map M-Files values accurately into SharePoint.

Step 3: Locate the Source Invoice Files

While metadata resided in SQL and XML sources, the actual invoice documents were stored in folders on the M-Files server using binary (BIN) file formats and system-generated naming conventions.

We identified the storage locations containing these files and prepared them for extraction and transformation.

Step 4: Reconstruct Original File Names with Power Automate Desktop

One of the more complex aspects of the project involved converting thousands of BIN files back into meaningful business documents.

Using Power Automate Desktop, we developed an automation workflow that:

  • Read the extracted metadata

  • Identified the corresponding BIN files

  • Copied the files from the M-Files storage location

  • Renamed each file using its original document name

  • Organized the reconstructed files into a staging folder

This automated process eliminated the need for manual file recovery and ensured consistency across all migrated content.

Step 5: Build the SharePoint Destination

With the source content prepared, we created a new SharePoint Online Document Library designed to support the client's invoice management requirements.

The library included custom metadata columns corresponding to the original M-Files property definitions, such as:

  • Invoice Number

  • Invoice Date

  • Supplier

  • Invoice Amount

  • Approver

  • Document ID

  • Additional business attributes

This ensured the migrated content would remain searchable, filterable, and reportable within SharePoint.

Step 6: Migrate Documents with the SharePoint Migration Tool

To move the files efficiently into Microsoft 365, we utilized the SharePoint Migration Tool (SPMT) provided by Microsoft.

The migration tool imported all invoice documents from the staging folder directly into the new SharePoint Document Library.

Benefits of using SPMT included:

  • High-volume document migration capabilities

  • Reliable transfer performance

  • Support for SharePoint Online

  • Detailed migration reporting

  • Reduced migration risk

Within a short period, all 50,000+ invoices were successfully uploaded and available within SharePoint.

Step 7: Populate SharePoint Metadata Using Power Automate

After the documents were loaded into SharePoint, we implemented a Power Automate cloud flow to enrich the files with their corresponding metadata.

The automation:

  • Read the exported metadata file

  • Referenced the XML crosswalk files from the M-Files export

  • Matched invoices to their SharePoint documents

  • Updated metadata columns automatically

  • Applied transformed values where required

The result was a fully tagged and searchable document repository that preserved the business context of every invoice.

The Results

The project delivered significant benefits for the client:

✅ Migrated over 50,000 invoices

✅ Preserved critical invoice metadata

✅ Maintained document search and retrieval capabilities

✅ Reduced dependency on legacy infrastructure

✅ Leveraged existing Microsoft 365 licensing

✅ Eliminated ongoing M-Files licensing costs

✅ Created a scalable foundation for future document management initiatives

Why SharePoint Made Sense

Because the client was already licensed for Microsoft 365, SharePoint Online provided a natural destination for their document repository. By consolidating onto a platform they already owned, the organization simplified its technology landscape while reducing operational costs.

In addition to the immediate savings from retiring M-Files, the client gained access to the broader Microsoft ecosystem, including:

  • Microsoft Teams integration

  • Power Automate workflows

  • Microsoft Search

  • Sensitivity labels and compliance features

  • Document versioning and retention policies

  • Integration with Power BI and other Microsoft services

Conclusion

Migrating from a legacy document management platform requires more than simply moving files. Success depends on preserving the metadata and business processes that make those documents valuable.

By combining SQL data extraction, M-Files structure exports, Power Automate Desktop, the SharePoint Migration Tool, and Power Automate cloud workflows, we successfully migrated over 50,000 invoices into SharePoint Online while preserving the integrity of the client's information.

The result was a modern, cost-effective document management solution built on technology they already owned through Microsoft 365.

Next
Next

Transforming Patient Flow with a Live Acuity-Based Bed Board