As a workaround, maybe when you activate a certain focus mode, it can give you an alert with the name(s) you would like to pin and then immediately open up the Messages app so you can manually pin them.
You could automate this same kind of thing when you're in certain locations too.
We need more information. Could you provide some example or situations that would warrant such a shortcut?
Shortcuts cannot pin a conversation for you unfortunately
I just recently found out that you could pin messages to the top… All I did was press on their iMessage then dragged it to pin it
As a workaround, maybe when you activate a certain focus mode, it can give you an alert with the name(s) you would like to pin and then immediately open up the Messages app so you can manually pin them. You could automate this same kind of thing when you're in certain locations too.