File Identifier in Power Automate: Find the Right Value

A file identifier in Power Automate is the connector-specific value an action uses to locate a file; for SharePoint, you usually supply the Identifier dynamic content from an earlier trigger or action. It is not the same as the document’s numeric list-item ID, file content, or sharing link. The key is to match the value you have to the input the next action expects.

What a File Identifier Means in Power Automate

A SharePoint document is both a file and an item in a document library. That is why the same trigger can return several values that look like identifiers but serve different purposes:

  • Identifier locates the file for connector actions.
  • ID identifies the document’s library list item and is used by actions that work with its column values.
  • Path describes the file’s location.
  • File Content contains the file’s data, not its identity.

The action you are configuring determines which value belongs in its input. For example, Get file content reads the document itself, while Get file properties reads its library columns.

Labels also vary between connectors and actions. An output named Id from file metadata can be a file identifier, even though an ID from a SharePoint library trigger is a numeric item ID. Check which action produced the value rather than choosing it by name alone.

How to Use a File Identifier in a SharePoint Flow

A SharePoint flow can pass a file trigger’s Identifier to Get file content to retrieve the triggering document without hard-coding a filename.

Step 1: Prepare the SharePoint Connection

  1. Confirm that the account used by the SharePoint connection can access the source document library and read the file.
  2. Choose the source Site Address in Power Automate.
  3. Before retrieving, copying, or processing the file, check its size. The Microsoft SharePoint connector supports files up to 100 MB; this is a connector limit, not SharePoint’s general upload limit.

For an on-premises connection, Microsoft supports SharePoint 2016 or 2019 through the On-Premises Data Gateway. Configure that connection before adding the file actions.

Step 2: Add the Trigger and Content Action

  1. Add the SharePoint trigger When a file is created or modified (properties only).
  2. Select the source Site Address and Library Name. Restrict the folder if the flow should process only part of the library.
  3. Add the SharePoint action Get file content and select the source site again.

The trigger supplies file properties, not the document’s contents. The added action retrieves the actual file data.

The table pairs each value-producing trigger or action with a file-input value and values not to substitute:

Value-Producing Trigger or Action Value to Use for the File Input Value Not to Substitute
SharePoint file trigger with properties-only output Identifier Numeric ID
SharePoint Get file properties Identifier Numeric ID
SharePoint Get files (properties only) Identifier from the current file in the loop The entire value array
SharePoint Get file metadata using path File metadata Id ItemId or Path
OneDrive for Business file metadata action Id, in a compatible OneDrive action Path or a SharePoint identifier

Step 3: Populate File Identifier With Dynamic Content

  1. Click the File Identifier input in Get file content.
  2. Open dynamic content and select Identifier from the trigger.
  3. Confirm that the selected token belongs to the source trigger, not another similarly named action elsewhere in the flow.

Do not type the word Identifier into the field. Insert the dynamic-content token so Power Automate substitutes the triggering file’s value at runtime.

If you need an expression, first inspect a test run’s trigger body. When the output property is exactly {Identifier}, this expression reads it:

triggerBody()?['{Identifier}']

The braces are part of the property name. Use the expression only when that property exists in your trigger output; otherwise, select the appropriate token from dynamic content.

Use a path-based action when you have a path; use the documented identifier representation when an action asks for File Identifier.

Do not assume every file identifier must look like an opaque GUID. Microsoft’s SharePoint action definitions include path-like identifier examples such as folder1/folder2/dsName and folder1/folder2/folder3. Treat these as action-specific examples, not templates for manufacturing an identifier.

Also distinguish file identifiers from other identifiers in the connector reference: 0x0120D520 is a SharePoint Document Set content-type ID, not the identifier of an individual document. Check the File Identifier field documentation for the specific SharePoint action, and prefer a compatible returned token over a manually constructed value.

Step 4: Save and Test the File Retrieval

  1. Save the flow.
  2. Create or modify a test document in the trigger’s selected library or folder.
  3. Open the resulting run and inspect Get file content.
  4. Confirm that its input resolved to the triggering file’s identifier and that the action returned file content successfully.

Binary documents may appear as encoded data in the output. That is normal; the output is not intended to look like a readable Word document or spreadsheet.

The retrieval flow is now complete. When you extend it, pass the action’s File Content output into a destination field that expects file data, not into another identifier field.

Use Paths, Item IDs, and OneDrive Files

The trigger-based approach is not always available. These alternatives resolve the file from the information you already have.

When You Have a SharePoint File Path

If your only goal is to read the file, use the path-based action directly:

  1. Add SharePoint Get file content using path.
  2. Select the file’s Site Address.
  3. Populate File Path with the location expected by that action, including the library, folders, filename, and extension. Use its picker to establish the correct path format for the selected site.
  4. Save and test the flow, then confirm that the action returns the intended file’s content.

A browser sharing link is not a file path. Do not paste a sharing URL into the path input.

If the next action specifically needs an identifier instead, resolve the path first:

  1. Add Get file metadata using path and supply the source site and file path.
  2. Add the identifier-based action you need.
  3. Inspect the metadata output and use a returned identifier only if it matches the downstream action’s documented file-identifier requirements.
  4. Save and test, checking both that the metadata belongs to the intended file and that the downstream action succeeds.

There is no need to add the metadata lookup when Get file content using path already completes the task.

When You Have a Numeric SharePoint Item ID

A numeric ID can help you find the file, but it should not be inserted directly into Get file content.

  1. Add Get file properties.
  2. Select the correct Site Address and Library Name, then supply the numeric value in Id.
  3. Add Get file content for that source site.
  4. Set File Identifier to a compatible file-identifier value, not the numeric item ID.
  5. Save and test with a known document. Confirm that the retrieved properties and content belong to that document.

The library selection matters because a list-item ID is meaningful within its list or library, not across the entire SharePoint environment.

When the File Is in OneDrive for Business

Use the OneDrive for Business connector throughout the lookup and retrieval:

  1. Obtain a returned file identifier from a compatible OneDrive trigger or action. Use an Id token only if that action documents it as the file identifier.
  2. Add OneDrive for Business Get file content.
  3. Populate its File input with that Id.
  4. Save and test using the same OneDrive connection, then verify that the expected file content is returned.

If you have only a path, use OneDrive’s Get file content using path. Alternatively, use Get file metadata using path first when another action needs the returned Id.

A SharePoint identifier should not be assumed to work in a OneDrive action, even when both locations are part of Microsoft 365.

File Identifiers in Other SharePoint Actions

SharePoint actions use file identifiers differently for copying files, selecting folders, reading attachments, and setting content approval status.

Copying a File

For SharePoint Copy file, the source file and destination folder are different inputs with different meanings.

  1. Set Current Site Address to the site containing the source document.
  2. Select the source document using the action’s documented input format.
  3. Select the destination site and folder, then choose the required behavior if a file already exists there.
  4. Test with a disposable document and verify that the copy appears in the intended destination.

If a later action must read or update the copy, resolve the destination file’s identifier from its returned metadata or destination path. Do not keep targeting the source file.

When the destination is also monitored by a trigger, narrow the trigger’s scope or add a condition so the copied file does not unintentionally restart the process.

Getting Folder Metadata

Choose the folder itself as the metadata target, rather than a document inside it.

  1. Supply the identifier returned for the folder by a compatible SharePoint action.
  2. If you have only the folder’s path, use Get folder metadata using path instead.
  3. Run the flow and verify that the returned name and location identify the intended folder.

For folder-hierarchy exports, keep the exported parent ID separate from the connector identifier. Build a lookup of folder locations and their exported IDs, then match each item’s parent location to that lookup.

For an export schema that uses 0 as the root-level parent-ID fallback, compare the folder’s Path with the library’s Path before applying the parent-ID expression. Assign 0 when the parent is the library root; otherwise, assign the matched parent folder’s exported ID. Validate the export by checking both a root-level folder and a nested folder. This fallback is an export convention, not a universal SharePoint folder identifier.

Reading List-Item Attachments

A SharePoint list attachment is not a document-library file. Microsoft’s SharePoint connector supports list-item attachments up to 90 MB, so check attachment size before processing it.

To retrieve an attachment:

  1. Add Get attachments, supplying the site, list, and parent list-item ID.
  2. Iterate over the returned attachments.
  3. Inside the loop, add Get attachment content.
  4. Use the action’s documented inputs to select the current attachment; do not substitute the parent list-item ID for the attachment identifier.
  5. Test with a known attachment and confirm that its content is returned.

The parent item ID identifies the list item; the attachment identifier selects the attachment belonging to it. Neither can replace the other.

Setting Content Approval Status

For Microsoft’s SharePoint connector, Set content approval status is available for SharePoint Online and SharePoint 2019.

For a page or document in a library using content approval:

  1. Retrieve its current metadata with Get file metadata, using its file identifier.
  2. Configure Set content approval status with the target site, library, and numeric item ID.
  3. Supply the current ETag from the metadata action. An ETag is required for pages and files.
  4. Choose the intended approval status, run the flow, and verify the resulting status in SharePoint.

An ETag represents the file’s version state; it is not another file identifier. Retrieve it close to the approval action so an intervening change is less likely to make it stale.

Troubleshoot and Verify File Identifiers

Inspect failed inputs and test the connection, identifier source, source site, and retrieved document to verify a working flow.

Diagnose the Failed Action

Open the failed run and inspect the action’s resolved inputs before changing expressions or encoding.

Symptom Likely Cause First Check or Fix
File not found, although the document exists Wrong identifier type, source site, or connection Compare the failed input with the upstream output and verify the source site
File not found with a manually entered location A path was supplied to an identifier-based action Use the appropriate path-based action or resolve metadata first
An identifier expression evaluates to null Wrong property name or wrong source action Inspect the actual output body and select the correct dynamic token
The action works with the picker but fails with a variable The variable contains a display path rather than the stored identifier Populate the variable from compatible identifier output
The flow processes the wrong document repeatedly A fixed value or a token from outside the current loop Use the current file’s identifier inside the loop
Access denied or a permission-related failure The connection lacks access to the target Check the connection account’s permissions and authentication
Retrieval fails for only some entries A folder was passed to a file-content action, or the file was deleted Confirm the entry is an existing file before retrieving content

Avoid automatically applying URL encoding or decoding to an identifier. A returned identifier may already contain the representation its connector expects. Alter it only when the specific action’s documented contract requires that transformation.

Confirm the Working Flow

Before relying on the flow, verify that:

  • The connection can access the intended source.
  • The identifier comes from the correct trigger, action, or current loop item.
  • The source site matches the file being retrieved.
  • A different test document causes the flow to retrieve that different document.
  • Any copy, update, attachment, or approval action produces the intended result.

Name actions by purpose, for example, Get Source File Content and Get Destination File Metadata, so their dynamic tokens remain distinguishable.

Once the test passes, replace any fixed picker selection with the verified dynamic token and run the flow again before enabling downstream actions that modify files.

Frequently Asked Questions

Is a SharePoint File’s UniqueId the Same as Its Identifier?

No. SharePoint’s UniqueId is a GUID associated with the file, while the connector’s Identifier is the value expected by particular file actions. If an action asks for File Identifier, do not substitute a GUID merely because it is labeled “unique”; use the compatible connector output.

Why Does the File Picker Show a Path When the Action Requires an Identifier?

The picker can display a readable location while supplying the connector’s underlying identifier. Copying the displayed text into a variable does not necessarily preserve that underlying value. Use identifier dynamic content for an identifier-based action, or a path-based action when your variable contains a path.

Will a File Identifier Stay the Same After a Rename or Move?

Do not assume that every connector’s identifier remains usable after a rename or move. Identifier behavior depends on the connector and operation, and some representations are location-dependent. For a later operation, use the identifier returned by the operation that changed the file, when available, or resolve the file again at its current location.