Download SSRS report as a PDF with Power Automate – Part 2
Checkout Download SSRS report as a PDF with Power Automate – Part 1
In this blog, we will see how to extract the value for PdfDownloadUrl so we can load it into another request and get our PDF. We’ll do this in 3 parts.
Step 7 – The start of the URL – Add a compose action for the following:
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-47.png)
add(indexOf(outputs('HTTP_-_POST_Report_Viewer')?['body'],'"PdfDownloadUrl":"'),18)
Step 8 – Length of PdfDownloadUrl – Add a compose action for the following:
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-48-1024x134.png)
sub(indexOf(outputs('HTTP_-_POST_Report_Viewer')?['body'],'","PdfPreviewUrl"'),outputs('PDF_Download_Start_-_Index'))
Step 9 – Extract and convert the PdfDownloadUrl from the body – Add a compose action for the following:
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-49.png)
Replace(substring(outputs('HTTP_-_POST_Report_Viewer')?['body'],outputs('PDF_Download_Start_-_Index'),outputs('PDF_Download_String_Length')),'\u0026','&')
Step 10 – Download PDF
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-50.png)
Step 11 – Use a variable to send the Report PDF data
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-51.png)
Step 12 – Send an Email
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-52.png)
Output –
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-53.png)
![](https://www.cloudfronts.com/wp-content/uploads/2022/06/image-55.png)
Hope this helps!