I'm trying to display a pdf recovered using a GET request to a RESTful API in the Power Apps Pdf Viewer.
I've created a customer connector for the GET request which returns a pdf in the response body. I can see this API call is works fine in the test mode of the customer connector ( as well as in Postman).
I don't know a way of getting to the response body of the connector call in Power Apps so I've created a Power Automate flow to call the API and return the pdf in file type response property of a "Respond to Power App or Flow" action (see below).
I then call the flow from an OnSelect event of a Power App button and use UpdateContext to assign the response to a local variable.
I'd rather hoped that simply assigning the document property of the pdf viewer to the local variable but alas not. The api appears to call ok (Power Apps seems to think for a few secs) but the pdf viewer doesn't display the file and no error messages appear.
Can anyone advise how I can get the pdf response of my API call to display in the Power App pdf viewer please?
Thank you
Jonathan
