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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get file content using...
Power Automate
Suggested Answer

Get file content using path with dynamic content

(0) ShareShare
ReportReport
Posted on by 5
Hello,
 
I'm trying to build a simple flow which would send out invoices automatically to customers from share mailbox. For this I have:
1) an excel file stored in SharePoint containing invoice numbers and customer emails;
2) Folder in SharePoint where invoice files (in pdf format) are stored. Name of the invoice files always is "Invoice number.pdf"
 
The logic I tried to use for a flow is as follows:
1) Manually trigger a flow;
2) List rows present in a table;
3) Apply to each;
4) Get file content using path;
5) Condition
6) Send an email from a shared mailbox.
 
But the issue I have is with "Get file content using path" action. Since the invoice file which needs to be sent out depends on the invoice number mentioned in excel I tried to use the dynamic content inside the path (/Shared Documents/Send out invoices/Invoices/@{items('Apply_to_each')?['INVOICE NUMBER']}.pdf) but it doesn't work and I keep getting errors when try to test the flow. I remember previously building a similar flow and then I used additional action "Build file path" before "Get file content using path" and it worked perfectly, but this "Build file path" action is not available anymore, so I do not know how to fix the error. I also tried to use the "Compose" action to build a file path and also tried to add a file path in the excel as a separate column, but it still doesn't work, so I'm running out of options. Hope somebody can help.
 
Thanks a lot in advance!
Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at
    Hi there,
    I recommend adding the following expression to a Compose action before your Get file content using path step:
    /Shared Documents/Send out invoices/Invoices/@{items('Apply_to_each')?['INVOICE NUMBER']}.pdf
    Then, use the output of the Compose action as the input for your Get file content using path action.
    After the flow runs, check the output from the Compose action. This will help you confirm whether the correct file path is being referenced.
    Let me know how it goes!
     
    Thanks
    Sudeep
  • Suggested answer
    EJ-31051141-0 Profile Picture
    5 on at
     
    Thanks a lot for the recommendation. I added the compose action exactly as you suggested, however the flow still goes to error "Action 'Get_file_content_using_path' failed: File not found" when I try to run it.
    I checked the output of Compose action and the correct file path is being referenced, therefore I do not understand why file is not found. Any other ideas how to potentially solve this?
     
    Thanks a lot!
  • IH-30061944-0 Profile Picture
    2 on at
    Hello I want to do same, but choosing 2 files to be send for the same recipient, how I can choose the 2 files?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 523

#2
Valantis Profile Picture

Valantis 318

#3
David_MA Profile Picture

David_MA 235 Super User 2026 Season 1

Last 30 days Overall leaderboard