Hello everyone,
I built a flow that will generate an SSRS report as PDF dynamically from Dynamics by following the below article:
D365 reports as PDF with Power Automate
After I have followed all the steps mentioned and performed different testing, sometimes the flow calls the API and output, as a result, the content type of the file, and sometimes it fails with the below response using the same report ID:
Inner Error returned:
""innerError": "Object moved \r\nObject moved to here.
\r\n\r\n"
Some succeeded runs attempts (Without any changes to the flow):
I found a workaround to handle the HTTP failure as I have added a loop to run the HTTP request in until it succeeds. I gave 10 the count of my do until it goes with every attempt a few seconds apart and it works well after 2-3 attempts and not from the first one.
I have also tried to add to my header Accept: application/json without the do until since it states that the response is not in JSON format but it keeps on failing. According to that post: REST API - Use the "Accept: application/json" HTTP Header - Stack Overflow
I am still troubleshoot this further how I can workaround the URL to make it compatible with JSON.
This flow really scares me as it might and might not work because I will be sending this report to our customers and I want to avoid any issue that might happen to the flow.
Kindly note that if you try to reproduce the same flow you will encounter the same issue.
I already raised the same concern to the Power Automate community that can be found here with no answer.
Any idea what will be the workaround to handle this issue and to avoid flow failure?
would highly appreciate your input regarding the above and any help is highly appreciated.
Thank you!