@Anonymous the "For a selected file" does indeed work and works very well. One way I use it several times a week is to publish an adaptive card to our company's All-Staff Teams site whenever I publish a news item on our SharePoint intranet (just another method of putting news in front of staff!)
I have a column in my Site Pages library on our intranet that is a single line of text column, formatted with JSON to show a button that is linked to the flow. When you click on the button the flow starts and posts the item to the Teams channel. The actionParams line should have the ID of your flow, so you'll need to create the flow first:

The JSON code is as follows (don't forget to change the ID of the flow to yours and to change or delete the the visibility line:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Publish to Teams",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"021ec4e0-8f85-46b3-a557-a4456960a4eb\"}"
},
"style": {
"background-color": "#468259",
"color": "white",
"visibility": "=if(([$PublishedToTeams] == 'Yes'),'hidden','visible')"
}
}
The flow looks like this with the trigger being a SharePoint "For a selected file":


I then update the Site Pages library and switch the PublishedToTeams column to Yes which hides the button in the list.

The result in Teams looks like this:

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.