After SharePoint deletes a file, Get file metadata cannot retrieve its path because the identifier no longer resolves. Capture the name, ID, and path before deletion, then use those stored values in the notification.
Why Post-Deletion Metadata Lookups Fail
Actions that read file properties require a live item. A 404 commonly means the object is gone; a 401 can indicate permission trouble, but extra permission cannot restore an already deleted item.
Capture the Path Before Deleting the File

- Provide a controlled SharePoint JSON button or Power Apps deletion action.
- Pass the site, library, item ID, file name, and server-relative path to the flow.
- Store those values in variables or a log list.
- Delete the file only after the values are saved.
- Build the admin message from stored metadata and include the flow run ID and deletion time.
Restrict Direct Deletion When Logging Is Mandatory
If every deletion needs a complete alert, users cannot also have a path that bypasses the flow. Test any permission change in a noncritical library and preserve an emergency recovery route.
Verify Logging and Recovery
Delete a uniquely named test file through the controlled command. Confirm the saved path, successful notification, run history, and expected SharePoint recycle-bin entry.
Review Exported SharePoint Logs with WPS Office
WPS Office cannot restore SharePoint metadata after deletion or alter Power Automate connector behavior. Capture-before-delete must run in SharePoint and Power Automate.
WPS Spreadsheets can open exported XLSX or CSV deletion logs, while Writer and PDF can prepare audit reports. This provides a free, lightweight local workspace without replacing SharePoint permissions or retention.

Capture a Deleted SharePoint File Path in Power Automate FAQs
Why does Get file metadata return 404 after deletion?
The identifier points to a file that no longer exists. Capture metadata before deleting it.
Can extra permission recover the path afterward?
Permissions can resolve a genuine 401 but cannot make a deleted item available to normal metadata actions.
Which values should the flow store?
Store the site, library, item ID, file name, path, deleting user, timestamp, and flow run ID as policy permits.
How do I verify the controlled deletion?
Use a test file and confirm the stored path, deletion, notification, run history, and recycle-bin entry.




