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 / Find File in OneDrive ...
Power Automate
Answered

Find File in OneDrive Folder, then attach to email

(0) ShareShare
ReportReport
Posted on by 4

I'm trying to dynamically attach a given file from my OneDrive folder to an email, but I'm not sure what to do next after the file has been found using Find Files in Folder.

 

Here's the situation: an email containing an ID number in the body text comes in. I extract the ID number, and pass it along to Find Files in Folder as the Search Query value. The file I'm looking for will have the ID number as its file name, such as "123456.pdf".

 

Everything works up to that point: the ID number is extracted, and Find File succeeds. The next steps to attach the file to an email as I understand it are to pass the filename and filepath into Get File Metadata (GFM), and then into Get File Content, and use the output from these two steps to create my email attachment. But I can't seem to pass the data returned by Find File into GFM. Find File doesn't return the OneDrive folder path. I've tried to manually enter the folder name and add the file name ('/MyFolderName/[Name]'), but that doesn't work.

 

I've also tried to build the correct path using Compose - concat('/MyFolderName/', outputs('ID') [ID is the name of the Compose rule that contains the ID number], '.pdf') - but that doesn't work either.

 

I'm only ever going to attach one file to the outgoing email, so I'm not even sure if Find File is the way to go. I'm new to Flow, so I'd appreciate any guidance.

Categories:
I have the same question (0)
  • Verified answer
    v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @rmurrellhc ,

     

    I have made a test on my side and you could refer to screenshot below to create the flow:

    1.PNG

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • POBrien Profile Picture
    2 on at

    This will work for one file to find and then attach by email. But what if I have two images to attach to an email? This workflow doesn't seem to work, as anytime there is something with the possibility of 2 entries (in this case, two photos), power automate seems to default to iterating over the two and creates a separate email for both of them.

     

    Thank you for your assistance in advance.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard