Business colleagues discussing paperwork around an office table
Illustrative stock photograph. Pexels. Not a product screenshot or evidence of a test.

List Attachment or Library File: Use the Matching Power Automate Content Action

A SharePoint list attachment and a document-library file use different retrieval workflows. If Power Automate can list an attachment but cannot read its bytes, check the action pair and identifiers before changing permissions or rebuilding the connection.

Use a harmless sample attachment and a test flow. This guide concerns retrieving content from SharePoint, not adding files to an approval request. Do not expose document bytes, signed links or credentials in logs while diagnosing the action inputs.

Establish where the source is stored

Open the source through SharePoint and determine whether it is attached to a list item or stored as a library document. A link in a list column can point to a library file without making that file a list attachment. The visible filename alone does not identify the storage model.

The SharePoint connector reference distinguishes Get attachments, Get attachment content and file-content operations. Use the definitions for the source you actually have rather than assuming every action accepts the same kind of identifier.

Map a list attachment route

Identify the site, list and item ID first. Retrieve that item's attachment collection, then use the identifier returned for the particular attachment with the matching content action. Keep the list item's numeric ID distinct from the attachment's identifier.

Map a library document route

Identify the site and library file through the supported file action. Use its file identifier with the applicable content operation, or use an explicitly path-based operation when that is the intended route. Do not put a display filename into an identifier field merely because it looks recognizable.

Inspect outputs before joining actions

Run only the metadata retrieval steps in a safe test. Inspect field names and types in the sanitized output. A dynamic-content label can be similar across actions while representing a different value, so trace where each token originates.

Microsoft's Get items and Get files guidance reinforces the distinction between lists and libraries. That initial source choice determines the rest of the retrieval chain; changing a later content step cannot repair an incorrect assumption about the source.

Source or valueWhat it represents
List item IDThe parent record, not its attachment bytes
Attachment identifierA particular attachment returned for that item
Library file identifierA file object used by matching file actions
Filename or displayed URLHuman-readable information, not universally an action ID
Office workers and equipment illustrating a digital document workflow
Illustrative stock photograph of workplace activity, not a product screenshot or a test result. Photo: Pexels.

Handle attachment collections deliberately

A list item can have no attachments, one or several. Check the returned collection and choose the intended policy. Do not select the first element silently if the business process expects a named document or every attachment.

Test an empty item

Create a test record without an attachment and confirm the flow follows a defined no-file path. A missing file is not necessarily an authentication failure. Avoid repeated retries against an item that legitimately contains no content.

Test two different attachments

Use clearly named harmless files and verify that each content call reads the matching attachment. This catches a loop that accidentally reuses one identifier for every iteration. Confirm the output's filename and bytes together before enabling downstream delivery.

Keep access errors separate from mapping errors

If the correct content action still fails, verify that the connection account can access the specific item and file through the supported interface. Do not broaden site permissions to compensate for an identifier mismatch. Conditional access and organizational policies should remain in force.

Our SharePoint metadata guide can help keep record fields distinct from stored document objects. Document the chosen source model so a later flow editor does not substitute a similarly labeled dynamic value.

After successful retrieval, test the downstream action with only the harmless sample. Confirm that no binary content is embedded in an ordinary notification body by mistake and that the final destination is authorized.

Where the process selects a named attachment, test a deliberately nonmatching name too. The flow should report that condition rather than silently forwarding a different file from the same record.

Keep a concise action map listing source type, parent identity and matching content operation. The goal is a traceable path from the intended record to the intended bytes, with explicit handling for empty and multiple-file cases.