Forum Discussion
Trigger Power Automate from Power BI report button to export report data to Excel (with formatting)
- 5 months ago
Hi Raki39,
This is the expected behavior. When a Power Automate flow is triggered from Power BI, it uses the flow owner's connections rather than the user's identity who triggered it. As a result, actions like Create file in OneDrive will always write to the OneDrive linked to the flow owner, so files are created in your OneDrive even if other users run the report.
Currently, Power Automate does not allow the OneDrive or SharePoint connection to switch dynamically based on the triggering user. This means the flow cannot create files in each user's personal OneDrive when using a shared flow.
To address this, a common solution is to store the generated file in a central SharePoint document library and provide access to the user who triggered the export. You can identify the user (for example, using Power BI visual context or user information passed to the flow) and then share the file link or send it automatically. This lets each user access their exported data without relying on the flow owner's OneDrive.
This approach keeps the storage location consistent while enabling users to retrieve their exported files from the report.
Thank you and Contiue using Microsoft Fabric Community Forum.
Yes, all of this is possible!
so find below the tutorial to achive thi in power BI :
- Raki395 months ago
Helper I
Hi Juan-Power-bi
Thank you for the response and for sharing the reference video on creating the flow. However, the current approach is quite slow—inserting 200 records took nearly 6 minutes.I have acheived using Json script using Run script.Currently, all the flows are creating the files in my OneDrive, which is not the actual requirement. As I mentioned earlier, the file should download to the OneDrive or SharePoint folder of the user who runs the report.However, both the video you shared and the flow I implemented (faster using Json script) are downloading the files only into my OneDrive folder, eventhough, it was triggered by a different user. since the flow is running under my connection.What I am looking for is a solution where the flow can create the file dynamically for each user, so that the output file is saved in the respective user’s OneDrive or their designated SharePoint folder, based on who triggers or runs the report.Could you please let me know if this is possible and what approach can be used to achieve this?