web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Automate - Building Flows
Answered

Find File in OneDrive Folder, then attach to email

Like (0) ShareShare
ReportReport
Posted on 30 Oct 2020 13:24:48 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.

  • Verified answer
    v-alzhan-msft Profile Picture
    on 31 Oct 2020 at 04:10:19
    Re: Find File in OneDrive Folder, then attach to email

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2