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 / SharePoint Get attachm...
Power Automate
Answered

SharePoint Get attachment content - Error route did not match

(0) ShareShare
ReportReport
Posted on by 113

Hi all,

I tried to create a flow to 'copy' an image, which is stored as an attachment of a list entry in SharePoint to OneDrive.

To accomplish this I tried the following action steps:

Bildschirmfoto 2022-02-03 um 17.48.17.png

 

The run fails with the following error:

Bildschirmfoto 2022-02-03 um 17.55.35.png

 

The error message was:

 

"status": 400,
"message": "Route did not match\r\nclientRequestId: 5b72a24d-070d-4cde-b714-7ccc02591540\r\nserviceRequestId: 5b72a24d-070d-4cde-b714-7ccc02591540"

 

 

Unfortunately I do not have any ideas how to analyse the problem. As you can see, I use fixed ID ('1') and tried to get the file identifier as a result from 'get attachments' action. Which were successful and delivers 2 files as a result as expected...

 

Hope I missed something, since I have no more ideas.

Thanks a lot!

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    Please try the following expression to get the File Identifier:

    Snag_170ca2.png

    items('Apply_to_each')?['Id']

    Example of the content of Body from one of my flows:

    Snag_2cb242.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • ArminSimon Profile Picture
    113 on at

    Thanks @ekarim2020!

    That was the missing part...

    BTW: I would like to find those identifier (ie Id) directly inside the dropdown 😉

    Thanks again!

    Cheers

  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    In this example, as it's simple flow, it's a easier to demonstrate:

    Snag_35ce6af.png

    See also: Short Notes: Illustrating the Item() v Items(‘Apply_to_each’) function in Power Automate.

     

    Ellis

  • ArminSimon Profile Picture
    113 on at

    I am a bit confused, as the ID of 'Get attachments' is not expected to be existing, since 'Get attachments' contains the information of ALL attachments, whereas the 'body' of 'Apply to each' contains only the one of the current loop...

    But Thanks!

  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    The Get Attachments action returns the Id of the attachment (the File Identifier)  - not be be confused with the SharePoint List item ID:

    Snag_fa8c57b.png

    Snag_faab44b.png

    Hope this helps.

     

    Ellis

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard