Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
Question regarding Power Automate and Power BI Service.
Is there any option to make fields for workspace name and report name dynamic in Power Automate - step Export to file for paginated report?
At the moment there is only dropdown list to select value. However, I have multiple reports in a workspace whihch I have to export in excel format. Would it be possible to use dynamic fields inside loop so that one flow goes over all reports and export all of them.
Please share example of dymamic content if possible please.
Thank You.
Solved! Go to Solution.
Hi @ypyash75
The issue occurs because the indexOf() function is expecting a string, but an array was passed instead. To resolve this and correctly map Report IDs to Report Names, consider the below steps:
Instead of using separate arrays, create an object where Report ID is the key and Report Name is the value.Store this mapping in a Compose action or Object variable.
Use the Report ID from the loop and retrieve the corresponding Report Name using:
variables('ReportMapping')[items('Apply_to_each')]
Use the corrected expression to set the file name dynamically
concat(variables('ReportMapping')[items('Apply_to_each')], '_', formatDateTime(utcNow(), 'yyyyMMdd_HHmmss'), '.xlsx')
This ensures that files are saved using the correct Report Name instead of the Report ID.
If this post helps, please mark it as Accepted Solution.
Thank You.
Hi @ypyash75
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @ypyash75
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @ypyash75
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hello @ypyash75
Thank you for reaching out to the Microsoft Community Fabric Forum.
To dynamically set the workspace name and report name in the "Export to File for Paginated Report" action in Power Automate, please follow these steps:
In the "Export to File for Paginated Report" step:
-Value-@{items('Apply_to_each')?['workspace Name']}
-Value-@{items('Apply_to_each')?['Report Name']}
If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.
Thank you!
Hi @v-karpurapud thanks a lot for your time. I just realised that export action recognized report ID rather than when we pass multiple values in the variable. I did the same, I created:
1. array variables storing report IDs
2. used the apply to each loop for getting the IDs from the array using export to files for paginated reports action.
3. trying to save the files on sharepoint, but file name is coming as report ID wherein I need the report name as file name.
4. in order to to that, I created another array variable having report names ans using below expression to get the file name mapped to the ID
concat(variables('ReportNames')[indexOf(variables('ReportGUIDs'), items('Apply_to_each'))], '_', formatDateTime(utcNow(), 'yyyyMMdd_HHmmss'), '.xlsx')
unfortunately, I am getting the below error while running the flow:
Unable to process template language expressions in action 'Create_file' inputs at line '0' and column '0': 'The template language function 'indexOf' expects its first parameter to be of type string. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#indexof for usage details.'.
Hi @ypyash75
The issue occurs because the indexOf() function is expecting a string, but an array was passed instead. To resolve this and correctly map Report IDs to Report Names, consider the below steps:
Instead of using separate arrays, create an object where Report ID is the key and Report Name is the value.Store this mapping in a Compose action or Object variable.
Use the Report ID from the loop and retrieve the corresponding Report Name using:
variables('ReportMapping')[items('Apply_to_each')]
Use the corrected expression to set the file name dynamically
concat(variables('ReportMapping')[items('Apply_to_each')], '_', formatDateTime(utcNow(), 'yyyyMMdd_HHmmss'), '.xlsx')
This ensures that files are saved using the correct Report Name instead of the Report ID.
If this post helps, please mark it as Accepted Solution.
Thank You.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.