Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
It seems like the issue you are facing is related to the limitations of using the refreshAllDataConnections() method in Power Automate. Since this method is not supported in Power Automate, you need to use a different approach to refresh the workbook data before running the Power Automate Flow.
One possible workaround is to use the "Refresh Workbook" action in Power Automate before running your script to send notifications. Here's how you can do it:
- Open your Power Automate Flow and add the "Refresh Workbook" action from the Excel Online (Business) connector.
- In the "File URL" field, select the Excel file that you want to refresh.
- Click on "Save" to save the changes. Once you have added the "Refresh Workbook" action to your Flow, it should refresh the data in your Excel file before running the script to send notifications. Please note that this approach may take some time to refresh the data, depending on the size of your Excel file and the amount of data that needs to be refreshed. You can also add a delay action before running the script to allow time for the data to be refreshed.