Showing results for 
Search instead for 
Did you mean: 
New Member

Add individual pdf file to email from onedrive search



I have the following setting:

I have a forms which triggers an email.

In the email a want to add a pdf file from a onedrive folder. (I was able to trigger an email witouth attachement. )

In the Onedrive folder the pdf files are named 1.pdf, 2.pdf, ...


The flow should add a pdf file based on forms query ID. The idea in the end is that the first person that fills the forms gets 1.pdf, the second gets 2.pdf, and so on ...


I have a flow which looks up the file on ondrive. For now the query has just the number 1 in it as a search criteria. 

Later I have a variable which gets its value from the query id. 


I am stuck in the process where the flow should add the found pdf content to the mail.

In the mail I gave the name attachmenet.pdf to the attachement name field. 

And in the content field I only have metadata to choose from. 

I was able to get an email with a pdf file with that, but the file is broken. 


I tried with an intermidiate step with a "Onedrive Business - Get file content" but wasnt luck with that either. 


So how do I get the pdf content from the query inside the mail?


Any help is appreciated. 





Advocate II
Advocate II

Have you tried using the "create a share link" connection?


If this doesn't help I may be able to help more if you can provide some screenshots of your flow. 

I tried that but with no luck. I wasnt able to pass the found link/file to the create shareble link flow. (Same goes for the get file content I guess.)


Here is my flow: 



With that I get a broken file attached. 

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,043)