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 / Route did not match er...
Power Automate
Answered

Route did not match error when using Get file content action

(0) ShareShare
ReportReport
Posted on by 207
Hi Experts,
 
I am trying to move a file from one library (sub folders) to another library (create new folder based on the mail subject and move) and i am getting this error on Get file content action.
Using identifier from get files (properties only)
Below the flow and we are saving the mail attachments into the input folder , from there i want to create a new output folder date wise and move the file into the created output folder , until folder creation was done but still the get file having issues .
 
 
 
 
INPUT :
 
 
OUTPUT :
 
 
Please help to fix this ..
Categories:
I have the same question (0)
  • Verified answer
    Trait007 Profile Picture
    303 on at

    Hi,

    The "Route did not match" error in the "Get file content" action typically occurs due to one of the following reasons:

    1. Invalid File Identifier: The identifier passed to the action might not be correct or compatible with the Get file content action.
    2. File Not Found: The file may not exist at the time the action tries to retrieve it.
    3. Incorrect Dynamic Content: Using the wrong dynamic content from the Get files (properties only) step.

    Here’s a step-by-step guide to troubleshoot and resolve this issue:

    Steps to Resolve

    1. Confirm the Output of "Get Files (Properties Only)"

    • Ensure that the output of "Get files (properties only)" includes the file you want to process.
    • Validate that the Identifier or Path of the file is returned correctly.
    • Add a Compose action immediately after Get files (properties only) to log and verify the file properties.

    2. Use the Correct File Identifier

    • In the "Get file content" action, ensure you use the Identifier field (not the File Path or Name).
    • The Identifier is a unique reference for the file and is the most reliable way to fetch its content.
    • Dynamic Content Example:
      • From Get files (properties only): Identifier
      • For Get file content: Use the same Identifier.

    3. Handle Subfolders in "Get Files (Properties Only)"

    • If your files are in subfolders, ensure that the "Get files (properties only)" action includes files in subfolders:
      • Enable the Include Nested Items option in the action settings.
    • Ensure the folder path is correct when specifying the source location.

    4. Add a Delay if Files Are Being Moved or Created

    • If files are moved or created in a previous step, add a Delay action (e.g., 5 seconds) before the "Get file content" action to ensure the file exists and is accessible.

    5. Validate Folder Creation and File Availability

    • Verify that the file is actually moved to the newly created folder before "Get file content" is executed.
    • Add a condition to check if the file exists before trying to get its content:
      • Use the "Get file metadata using path" action to confirm file existence.

    6. Adjust Dynamic File Paths for Nested Folders

    • If you're dynamically creating folders, ensure the folder path is correct:
      • Use dynamic expressions to construct the path for the "Get file content" action.

    Example Dynamic Path:

    concat('Shared Documents/', variables('OutputFolder'), '/', outputs('FileName'))

    Flow Overview

    Here’s a simplified structure for your flow:

    1. Trigger: When an email with attachments is received.
    2. Action: Save attachments to the input folder.
    3. Action: Get files (properties only) to list files in the input folder.
      • Ensure nested files are included.
    4. Action: Condition to check file existence (optional).
    5. Action: Get file content using the Identifier field.
    6. Action: Create a new output folder dynamically based on the email subject and date.
    7. Action: Move the file to the newly created folder.

    Troubleshooting Tips

    1. Add Logging Actions:

      • Use Compose actions to log the outputs of key steps (e.g., "Get files (properties only)" and "Identifier").
      • Check the flow run history for values being passed to the Get file content action.
    2. Review File Properties:

      • Validate that the file you’re trying to access is listed in the Get files (properties only) output.
    3. Check Permissions:

      • Ensure the connection used in Power Automate has sufficient permissions to access and move files in the library.
    ----------------------------------------------------------------------------------
    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!

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 397 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 310 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 202 Most Valuable Professional

Last 30 days Overall leaderboard