If you’re tired of manually organizing documents across SharePoint folders, you’re in the right place. In this tutorial, you’ll create a Power Automate SharePoint Workflow 2025 that detects new documents based on naming rules and auto-logs them into an Excel table—without running 24/7 or breaking when moved to another site.
🚀 What You’ll Achieve
Using Power Automate SharePoint Workflow 2025, you’ll be able to:
- Monitor folders and subfolders for new files matching a naming rule
- Log metadata into a SharePoint-stored Excel file
- Avoid unnecessary flow runs using efficient triggers
- Reuse this flow across any SharePoint site
🧰 Prerequisites
- Access to Microsoft 365 with Power Automate
- A SharePoint Document Library
- A prepared Excel file stored in SharePoint with a formatted table
🧱 Step-by-Step: Create the Power Automate SharePoint Workflow 2025
🔹 Step 1: Prepare Your SharePoint and Excel File
- Create an Excel file named
DocumentLog.xlsx
. - Add a table named
DocLog
with columns like:- File Name
- File Path
- Created Date
- Document Type

📁 Store this Excel file in a central location (e.g., Documents > Logs
) in a SharePoint Site.

🔹 Step 2: Start a New Flow (Manual Trigger)
Since the flow should not run continuously, use a “Manually trigger a flow” or “Recurrence” trigger (set for once a day or week).
- Go to make.powerautomate.com
- Select Create > Instant Cloud Flow
- Name the flow:
SharePoint Workflow 2025
- Select trigger: Manually trigger a flow
- Click on “Create”
🔹 Step 3: Use “Get Files (properties only)” to Search Documents
- Add action:
Get files (properties only)
- Select the document library
- Enable “Include Nested Items” =
Yes
- Add a Filter Query for naming convention:
startswith(FileLeafRef,'Invoice_')

This lets your flow scan only specific files (e.g., starting with “Invoice_”).
🔹 Step 4: Append to Excel Table
- Use action:
Add a row into a table
- Enter the following in parameters:
- Location: SharePoint Site — select the site where the Excel file is located within a document library.
- Document Library: Documents — select the library that contains your Excel file.
- File:
/Logs/DocumentLog.xlsx
— select the Excel file by clicking the folder icon and browsing to its location. - Table:
Table1
— select the table name from the Excel file. You can verify the table name in Excel under the Table Design tab. - Map each file’s metadata — click on “Advanced parameters” to reveal the available column names, then map the corresponding values from the dynamic content below.
- File Name: Click the flash icon and select “Name” from the dynamic content list.
- Once you add Name, Power Automate will automatically insert an “For each” loop and wrap the “Add a row into a table” action inside it. This happens because Power Automate intelligently detects that the Name value is coming from a previous action—such as “Get files (properties only)”—which returns multiple items.
- File Path: Click the flash icon and select “Full Path” from the dynamic content list.
- Created Date: Click the flash icon and select “Created” from the dynamic content list.
- Document Type: Click the fx icon, enter the following expression, and click Add:
last(split(items('For_each')?['{FilenameWithExtension}'],'.'))
- File Name: Click the flash icon and select “Name” from the dynamic content list.

🔹 Result:
After you run the flow you will get all files data in excel file

📈 Bonus Tips
🔧 Optimize for Performance
- Avoid
For each
on large libraries without filtering - Archive old files to reduce query time
🏁 Wrapping Up
Your Power Automate SharePoint Workflow 2025 now smartly scans documents by naming convention, logs them into Excel, and runs only when needed—saving bandwidth, costs, and clutter.