Forum Discussion
Power Automate Button, how to automate button click daily?
- Anonymous10 months ago
Hi alya1 ,
Thanks for reaching out to the Microsoft fabric community forum.
The Power Automate visual in Power BI is designed for manual triggering only; it cannot automatically “click” itself daily. To run this process automatically, you should create a scheduled flow in Power Automate that executes every day. The original button can remain in your report for optional manual execution.
Connecting a Scheduled Flow to Your Power BI Report, the Apply to each error occurs because the scheduled flow does not receive the button payload (Power BI values), which is why it evaluates as Null.
To resolve it, create a Scheduled Flow using Recurrence as the trigger and set it to run daily. And Fetch Table Data from Power BI Service and use “Run a query against a dataset” action (Power BI connector). Then select your workspace and dataset, and write a DAX query to retrieve rows where the due date equals 10 days ago:
EVALUATE FILTER( 'YourTable', 'YourTable'[DueDate] = TODAY() - 10 )Now feed the query output to your Apply to each step instead of Power BI values. This ensures a valid array is passed, resolving the Null error. Keep your existing email actions inside the loop, mapping the required fields.
Also please note that Scheduled flows need to query the dataset directly and can't use button triggers. Manual and scheduled flows can operate at the same time without issues, but make sure the flow has the right permissions to access the dataset. With this setup, your flow will run automatically each day, and you’ll still have the option to trigger it manually if needed.
Also thank you Anonymous for your helpful resposne.
Hope this helps. Please feel free to rech out for any further questions.
Thank you .
Hey Alya,
In Power BI, the Power Automate visual is designed for user interaction, allowing users to click and run the flow. If you need to set a schedule and automate this flow, this can be done in Power Automate instead.
When you log in to Power Automate, you can find this flow and set a schedule. You can still keep the Power Automate visual in your report for manual triggering in addition to the scheduled flow which runs automatically daily.
Check out this blog to learn to schedule the flows: https://community.dynamics.com/blogs/post/?postid=6255feac-9928-450b-9781-73db2fe0e7ee
Hope that helps!
Numa
Hello Numa, Thank you for your reply.
I can set up a scheduled cloud flow but how can I establish connection to the power bi report in service?
I tried to just copy and paste the Apply to each step but got this error udnerstandably: "ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerBody()?['entity']?['Power BI values']' is of type 'Null'. The result must be a valid array."