sharepoint online – How do we call Power Automate Flow using Javascript button click?


we have a requirement of triggering the power automate flow using javascript button, we are still using the classic sharepoint site, we need to pass an item id to the power automate if they select an item in the list view and click on the button.

On the power automate side we will fetch the item by id and try to perform some calculations and update a different list.

Any help would be highly appreciated.