How to Fix Broken SharePoint Document Links After File Overwrites
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.

- 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.
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.
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.
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.
Replace the broken Document ID-based links in your portals, emails, or spreadsheets with the newly copied direct file path URL.
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.

Update File Content in Power Automate Instead of Overwriting
Modify your automated flow to update the existing file's contents rather than creating a new file to replace the old one.
Consult the Microsoft Power Automate Community
Seek advanced workflow-specific workarounds from Microsoft ecosystem experts.
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. Download and Install: Get the free WPS Office suite from the official website and install it on your device.
- 2. Open Your Files: Directly open your existing Microsoft Office documents without needing any file format conversion.
- 3. Save to Cloud: Use WPS Cloud to securely save your work and generate stable, easily shareable document links.

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.




