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 / UNC Folder Path Append...
Power Automate
Suggested Answer

UNC Folder Path Appending File Name in folderPath Causing 400 Error

(1) ShareShare
ReportReport
Posted on by 3

Hi all,

I’m running into a persistent issue with a Power Automate flow that saves email attachments into a network-shared folder based on a UNC path.

 

📌 Goal:

 

Automatically save invoice attachments to a specific project folder using a UNC path pulled from an Excel lookup table.

 

🧩 Flow Summary:

 

  •  

    Trigger: When a new email arrives (V3)


  •  

    Get Attachment (V2)


  •  

    Extract Project Number from attachment name


  •  

    Look up UNC Root Folder Path from Excel table


  •  

    Build the full folder path like:

    \\US0531-PPFSS01\SHARED_PROJECTS\{ProjectNumber}\01_management\financial\client_inv


  •  

    Use Create File to save the file with the original attachment name



  •  
 

🧨 Issue:

 

Despite setting folderPath correctly, Power Automate returns this error:

 
The requested action could not be completed. Check your request parameters to make sure the path '\\US0531-PPFSS01\SHARED_PROJECTS\227707697\01_management\financial\client_inv/227707697_2376990_2025.04.03.pdf' exists on your file system.
 

It seems like the file name is being appended to the folder path, treating the whole string as the folderPath, not separating folderPath from name.

 

✅ What I’ve already tried:

 

  •  

    Verified Build File Path output is correct (confirmed with Compose)


  •  

    File name is clean, confirmed via debug


  •  

    Changed name from @items('Apply_to_each')?['Name'] to @outputs('Get_Attachment_(V2)')?['body/name']


  •  

    Still getting the same 400 error referencing a full path that wrongly includes the file name



  •  
 

❓ What am I missing?

 

How do I ensure the Create File action only uses the intended folder path, and doesn’t interpret the full path + filename as folderPath?

 

Any help would be appreciated!

Screenshot 2025-04-17 152840.png
Screenshot 2025-04-17 152908.png
Categories:
I have the same question (0)
  • LM-17042025-0 Profile Picture
    3 on at
    @Michael E. Gernaey I will attach screenshots. I don't want to create a new file for every attachment, i just want it to identify the project # based on the invoice name (taken from my email), then find the corresponding folder on one of 3 drives my company uses (aka if true use this drive, if false use this drive), and then save it in the correct folder, under invoices. 
    Screenshot 2025-07-09 093715.png
    Screenshot 2025-07-09 093739.png
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,926 Super User 2025 Season 2 on at
     
    YOu will need to share your inputs into your Crreate File. Clearly you are creating a file for every attachment which is great and super easy, but you have so many filter array's and other actions that you are building up the wrong details to be used later on
     
    We cannot tell that from the closed flow actions. What you need to do, is go through the flow run you have attached, open Each action, and see what input and ouputs it creates.
     
    One of them is causing you to generate a path with the file name.
     
    I know this to be true, because the Get Attachments action is not giving yuou a location in some share to use, so its your expressions doing it (aka a bug).
     
    Walk it through slowly you will see it I promise
     
    If this helps please Mark as such and maybe a like.
     
    If you need more help please share all actions in the above run with inputs and outputs.

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

#2
David_MA Profile Picture

David_MA 270 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 210 Most Valuable Professional

Last 30 days Overall leaderboard