Mac's open command - too powerful
-
I don't actually recommend this because, as the title suggests, there's a potential security risk here if someone gets ahold of your password or token, but it's still pretty cool to play with and it solved this problem so I thought I'd post it as an example.
I added a command to my mac that runs the "open" command and enabled parameters.
Then I used the /triggercmd "slash command" with the TRIGGERcmd Slack app to open Finder to my desktop folder:
/triggercmd open on mac with ~/Desktop
Here's the dangerous bit: I also found I could run any arbitrary command on my mac.
For example I could also run calculator with this command:
/triggercmd open on mac with -a calculator
The "open" command is a little too powerful because it lets you run any command. So if you do this, don't give out your token or password to triggercmd.com (it's never a good idea to give those out anyway).
I warned you but in case you want to do it anyway:
-
Use the GUI editor to add a command called open with open as the command, and enable parameters.
-
Go here and click the Add to Slack button.
-
Go to the Instructions page and copy your token.
-
In Slack, run this slash command to link your Slack account with your TRIGGERcmd account:
/triggercmd-token [paste your token here]
-
Then run this slash command to test it:
/triggercmd open on mac with ~/Desktop
-
Profit.
If you just want to open Calculator, a safer Slack command would be this, which runs the built-in calculator command on your default computer.
/triggercmd calculator
-
-
how do i configure "my workspace" on slack?
-
@Felipe-Martins, log into your Slack workspace in a browser, then in the same browser, go here to add the TRIGGERcmd Slack app to your workspace:
https://www.triggercmd.com/user/auth/slack
If that doesn't answer your question, let me know and I'll elaborate, and add more details here.