When a Power Automate flow triggers on a new file in a SharePoint document library, it often needs to update the file’s metadata. If the library has columns set to Require that this column contains information, the flow may fail with an error like Access Denied or Item does not exist. This happens because the user who creates the file does not have permission to edit the metadata of that file at the moment the flow runs. This article explains why the permission check fails, how to fix the flow design, and what to do if related errors appear.
Key Takeaways: Fixing Power Automate Flow on Required Metadata
- SharePoint list or library > Column settings > Require that this column contains information: When enabled, the file creator must supply the value, but the flow runs under a different identity.
- Power Automate > Trigger > Use a trigger condition: Add a condition to wait until the metadata is available before the flow continues.
- Power Automate > Action > Update file properties: Use the file identifier from the trigger output, not a separate Get file properties action.
Why Power Automate Fails on Required Metadata After File Create
The root cause is a permission timing issue. When a file is uploaded to a SharePoint library, the file is created with minimal permissions. The file creator has initial ownership, but the metadata update action in Power Automate runs under the flow owner’s identity or a service principal. If the library has required columns, SharePoint blocks the metadata update because the file creator has not yet supplied the required values. The flow tries to update the metadata, but the system sees the file as incomplete and denies the write operation.
Another part of the problem is the When a file is created trigger. This trigger fires immediately when the file appears in the library, before any metadata is set. If the flow tries to update the file properties at that point, the update action fails because the required columns are empty. The error message may vary: Access Denied, Item does not exist, or Cannot complete this action.
The fix involves changing the flow trigger or adding a delay so the file is fully created and the metadata fields are populated before the update action runs.
Steps to Fix the Flow: Use a Trigger Condition or Delay
There are two reliable methods to fix this issue. The first uses a trigger condition to wait until the required metadata is present. The second adds a short delay before the update action.
Method 1: Add a Trigger Condition on the Required Column
- Open your flow in Power Automate
Go to Power Automate > My flows. Select the flow that fails on required metadata. Click Edit. - Select the trigger
Click on the When a file is created trigger. In the trigger settings panel, click the … menu and choose Settings. - Add a trigger condition
In the Trigger Conditions box, enter the following expression:@equals(triggerOutputs()?['body/{ColumnInternalName}'], '')Replace{ColumnInternalName}with the internal name of your required column. For example, if the column is Project Name, the internal name isProject_x0020_Name. This condition tells the flow to run only when the required column is not empty. - Save and test
Click Save. Upload a new file with the required column filled in. The flow should now run successfully.
Method 2: Add a Delay Before the Update Action
- Open your flow
Go to Power Automate > My flows and edit the failing flow. - Insert a Delay action
Click the + between the trigger and the Update file properties action. Search for Delay and select it. Set the delay to 1 minute. This gives SharePoint time to finalize the file creation and apply the required column values. - Adjust the Update action
In the Update file properties action, ensure you reference the file identifier from the trigger output. Use the ID dynamic content from the trigger. Do not use a separate Get file properties action, as it may also fail. - Save and test
Click Save. Upload a file. After one minute, the flow should update the metadata without errors.
If the Flow Still Has Issues After the Main Fix
Even after applying the trigger condition or delay, some issues may persist. Here are common problems and their fixes.
Flow Fails with Access Denied Error
If the flow runs but gets an Access Denied error, the flow owner may not have edit permissions on the library. Check the site permissions. The flow owner needs at least Contribute or Edit access to the document library. In SharePoint, go to the library settings and verify the flow owner’s account is listed with the right permission level.
Flow Fails with Item Does Not Exist Error
This error occurs when the flow tries to update a file that has been moved or deleted before the update action runs. Ensure the flow uses the correct file identifier. Use the ID from the trigger output, not a file name or URL. Also avoid using a When a file is created trigger on a library where files are moved from another location, as the file may already exist.
Flow Fails on Required Metadata for Multiple Columns
If the library has multiple required columns, the trigger condition method works for only one column. In that case, use the delay method instead. Alternatively, create a SharePoint list column that combines the required values into a single calculated column, then use the trigger condition on that calculated column.
| Approach | Trigger Condition | Delay Action |
|---|---|---|
| Setup complexity | Requires internal column name | Simple, no column name needed |
| Handles multiple required columns | Only one column supported | Works with any number of columns |
| Execution speed | Runs immediately after metadata is set | Always waits the set delay time |
| Risk of failure | Low if internal name is correct | Low, but delay may be too short |
After applying the correct fix, your flow will update metadata on new files without permission errors. For libraries with multiple required columns, the delay method is the more reliable choice. If you use the trigger condition method, always test with a file that has the required column filled in. To further improve reliability, consider using the When a file is created or modified trigger and add a condition that checks if the file has all required metadata before proceeding. This approach avoids timing issues entirely and works for any number of required columns.