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.
Hi @rmurrellhc ,
I have made a test on my side and you could refer to screenshot below to create the flow:
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.
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2