Example using Report API with Power Automate, save report to OneDrive for Business
- To configure the report request API endpoint with Power Automate, you will need to set up a power automate flow to receive the payload and save the pdf file from it.
- Navigate to https://make.powerautomate.com/
- Select ‘Create’ in the toolbar on the left, then ‘Instant cloud flow’
- Skip the next stage
- In the designer that appears, click ‘Add a trigger’
- Search for ‘When a http request is received’

- Update the following parameters:
| Parameter | Value |
| Who can trigger the flow? | Anyone |
| Request Body JSON Schema | { “type”: “object”, “properties”: { “reportId”: { “type”: “integer” }, “FormSubmissionIds”: { “type”: “array”, “items”: { “type”: “integer” } }, “returnUrl”: { “type”: “string” } } } |
- Add a new step to the automate flow
- Search for ‘Compose’

- Use the expression editor (click on the fx button) and enter the following:
base64ToBinary(triggerBody()?[‘Report’]) - Add a new step
- Search for ‘Create file’ and select ‘OneDrive for Business’
- Select a folder path within your OneDrive, enter a file name e.g. Report.pdf
- Set the file content to the ‘Outputs’ of the ‘Compose’ step
- Save the flow
- Select the Trigger step and copy the HTTP URL. This should be used in your Report Request in the ReturnUrl parameter
