logo
search
SharePoint Document Issues

How to Fix Broken SharePoint Document Links After File Overwrites

Amos GikundaAmos Gikunda Oct 14, 2026 871 views

Question details

The user needs to prevent embedded SharePoint document links from displaying a 'moved or deleted' error after a file is overwritten using Power Automate.

How to Keep SharePoint Document Links Working After File Overwrites
Product
SharePoint
Device & OS
not provided
Scenario
Automating document updates where an existing SharePoint file is replaced or overwritten by a new version with the identical file name.
Observed behavior
Overwriting the file creates a completely new Document ID, which breaks existing embedded links even though the file name and location remain unchanged.
Before you start

Verify whether your embedded links are utilizing the SharePoint Document ID format (which contains '?d=') or the static file path, as this determines how the links behave during file updates.

Solution 1Recommended

Use Direct File Path Links Instead of Document IDs

Bypass the auto-generated Document ID by linking directly to the static folder path and file name.

When a file is completely overwritten, whether manually or via Power Automate, SharePoint treats it as a brand-new file object and assigns a new Document ID. If your embedded links rely on this unique ID, they will break. By linking to the exact file path instead, the link remains stable as long as the file name and location are constant.

1
Copy the direct path URL

Navigate to your SharePoint document library, locate the file, and copy its direct web address. Ensure you remove any trailing parameters like '?d=XYZ' from the URL.

2
Update embedded links

Replace the broken Document ID-based links in your portals, emails, or spreadsheets with the newly copied direct file path URL.

3
Configure overwrite consistency

Ensure your Power Automate flow or manual upload process saves the new file with the exact same name and file extension in the identical SharePoint folder.

Use Direct File Path Links Instead of Document IDs
Important Limitation: Path-based links are stable against overwrites, but they will break if the file is eventually renamed or moved to a different SharePoint folder.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Management

If you frequently encounter limitations with complex Microsoft ecosystems like SharePoint and Power Automate, consider WPS Office as a lightweight, highly compatible alternative for your daily document creation and editing needs. It supports all major Office formats and offers integrated cloud solutions.

  1. 1. Download and Install: Get the free WPS Office suite from the official website and install it on your device.
  2. 2. Open Your Files: Directly open your existing Microsoft Office documents without needing any file format conversion.
  3. 3. Save to Cloud: Use WPS Cloud to securely save your work and generate stable, easily shareable document links.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Built-in WPS Cloud storage for stable document linking and easy sharing without complex ID issues.Lightweight application that runs smoothly on Windows, Mac, Linux, and mobile devices.Free to use with a highly intuitive, tabbed user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Document ID change when I overwrite a file in SharePoint?

Overwriting a file, whether done manually or through automated tools like Power Automate, deletes the original file object in the database and creates a brand-new one. SharePoint automatically assigns a new, unique Document ID to this new object, which breaks any URLs tied to the old ID.

Does using manual 'Save As' cause the same link-breaking issue?

Yes. If you save a file offline and then use 'Save As' to upload it back to the exact same SharePoint location with the same name, SharePoint still processes it as a file replacement. This changes the Document ID and breaks embedded links.

How do I get a stable link that won't break upon file overwrite?

You can create a static link using the exact SharePoint folder path and file name (e.g., https://domain.sharepoint.com/sites/SiteName/Shared Documents/Filename.docx). Be sure to remove any auto-generated Document ID parameters (like ?d=...) from the end of the URL.

Can I force Power Automate to keep the exact same Document ID when creating a file?

No, Power Automate cannot force a newly created file to inherit an old Document ID during a 'Create file' action. To preserve the ID, you must use the 'Update file' action to alter the document's content without replacing the file object itself.