cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CrispinSteele
Frequent Visitor

HTTP GET RESPONSE - Passing File Name

Hi All.

 

Thanks to others I have a parent flow which turns form responses into a word and pdf document which is uploaded to sharepoint and an email sent with the pdf document attached. 

 

Some of my users are ANON and without an email address.  In these cases what I am trying to do is set up a download or a download link to the file created.

 

So in this 'parent' flow I have an HTTP GET Request to my child flow.  If I hard code this child flow with a file the URL saves document to the local machine.

 

I need to pass the file name of the pdf document to the child flow for it to be used dynamically as the name of the file. The filename will change each time.

 

I received an error if I passed the file name in the body as it is not allowed with GET.  I can pass the name in the headers - but don't know how to make that useable in the child flow?

 

I have changed HTTP Request to POST which I can pass the file name to in the body to the child flow - but then I cant GET the download link to work as it expects a GET request.

 

I hope this is something easy to fix?

 

Cris

1 ACCEPTED SOLUTION

Accepted Solutions
MinRao
Resolver II
Resolver II

@CrispinSteele 

 

In parent flow, specify query in URI as following   [ &QueryName=QueryValue]  my example is "&filename=test.txt"

 

 

getquery.png

 

Then in your child http get trigger Flow, you can get query out by using

  

triggerOutputs()['queries']['filename']

 

getqueryout.png

Following is my test result from parent flow. 

 

testresult.png

View solution in original post

3 REPLIES 3
MinRao
Resolver II
Resolver II

@CrispinSteele 

 

In parent flow, specify query in URI as following   [ &QueryName=QueryValue]  my example is "&filename=test.txt"

 

 

getquery.png

 

Then in your child http get trigger Flow, you can get query out by using

  

triggerOutputs()['queries']['filename']

 

getqueryout.png

Following is my test result from parent flow. 

 

testresult.png

View solution in original post

Rei0116
Community Support
Community Support

Hi, I agree with MinRao's method, if you have any other question please let me know.

@Rei0116 

@MinRao 

 

Thanks for your help - as someone starting on the Power journey - it is good to have resources such as this to help! 🙂

 

It all works but not in way I was intending.  The HTTP URL works and will download the file as per MinRao instructions - I understand from previous postings that Power Automate (Flow) is unable to automatically open that link/URL to force the download - it needs user input to work. (please let me know if this can be done - unfortunately the FILE SYSTEM is not feasible as these computers are individually owned etc.).

 

Now that the file name is passed as part of the url- the url will be different each time.  Is there a way to pass this url through to another child flow or any other way to keep the static url that I can hard code into MS FORMS page that displays after submission?

 

Basically what my users will be doing is completing a MS Forms document.  This will generate a PDF document based on their form responses.  Some users will have an email address which is fine as a copy of the PDF is emailed.  Other users will be anonymous.  It is in these circumstances that I would like to either force the download of the document generated or provide a hardcoded link that can be selected by the user to download/save the document as per the child flow.

 

Thanks

Cris

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,163)