web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get File Content in Lo...
Power Automate
Answered

Get File Content in Loop Issue

(0) ShareShare
ReportReport
Posted on by 3
Hi Power Platform Folks 

I am trying to set up a formula to merge documents in a folder to a PDF using OneDrive. I have finished but I run into an issue right after my Apply to loop in the first "Get File Content" action. 

Here's a brief summary of my flow:
  1. Get files (properties only): I'm fetching all files from a specific SharePoint directory:
    • Site Address: REDACTED.sharepoint.com
    • Library Name: Shared Documents
    • Folder: /General/REDACTED
  2. Initialize Variables: I've initialized three variables before entering the loop.
  3. Apply to each: I loop through each file from the list obtained in step 1.
  4. Get file content: Inside the loop, I try to get the content of each file:
    • Site Address: Same as above.
    • File Identifier: I'm using Current item from the dynamic content, which should refer to the ID of each file in the loop.

However, I'm encountering an error when the flow tries to execute the 'Get file content' action. The error message I receive is:

"Action 'Get_file_content' failed: Route did not match clientRequestId: 228b5aa1-b1f5-433a-a617-be76d74b0f06 serviceRequestId: 002778a1-203c-7000-7d72-71deb44f60cc"

I've tried the following to troubleshoot:

  • Verified that the files exist in SharePoint at the time of flow execution.
  • Checked permissions to ensure my account has access to read these files.
  • Used expressions like @{items('Apply_to_each')?['ID']} to directly reference the ID, but the error persists.
  • Ensured the Site Address is consistent across actions.
  • Re-added the 'Get file content' action to refresh dynamic content.

Despite these efforts, I'm still facing the same error. Here's a screenshot of my flow setup for reference: 

Has anyone else encountered this issue? Any suggestions on what might be causing this or how to resolve it would be greatly appreciated. I'm particularly interested in any known issues with the SharePoint connector or specific configurations that might help.

Thanks in advance for any help!

Mark

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    Your problem is in Step#4. The Get File Content wants the File Identifier, not the Item ID.  If you check through the dynamic content you should see one listed as 'Identifier'. That is the one you want.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard