By combining Slack Slash Commands with Octoblu Triggers, you can control virtually anything with a simple text command.
OverviewOctoblu is an IoT platform that allows you to connect all of your devices and then send messages from one device to another. We will be utilizing Octoblu Triggers to kick off automations based on Slack Slash Commands.
Slack is a powerful chat tool that allows you to send messages, archive and search. It also has a great feature called Slash Commands. Slash Commands allow you to type a message, such as '/greet Dave
'. This will then send a request to the configured URL with the text, 'Dave'.
In this walkthrough, I will be showing you how to setup a Slash Command to start a GoToMeeting with Octoblu.
Octoblu Flow SetupAlthough I will briefly go over the flow, I recommend importing the Bluprint...
The most important Thing is the 'Start GTM' Trigger. It will be used by our Slash Command to kick off our meeting. If you click on the Trigger (not the play button beside it) and scroll down in the sidebar, you will be able to see an 'HTTP Post' url. Copy that URL as we will need it for setting up the Slash Command.
The rest of the Things in our flow are specific to this start meeting flow. You could easily replace the other Things with a lightbulb, Twitter, etc.
- Create New Meeting (GoToMeeting Thing): Starts a new meeting and generates a link used to join the meeting.
- Get Name and Channel ID (Compose Tool): Collects the join link from GTM, and the name and channel ID from the incoming Slash Command.
- Compose Message (Template Tool): Writes a message that consists of the name and join link.
- Get Channel ID and Message (Compose Tool): Collects the channel ID and message.
- Post Join Link to Slack (Slack Thing): Posts the composed message in the Slack channel that made the Slash Command.
Now that we have our flow all ready to go, we can setup our Slash Command to talk to our Trigger.
Slack Slash Command SetupFirst, you will need to go to your Slack. Then click on the name in the upper left hand corner and select 'Apps & integrations'. Now up in the top left corner, select 'Build'. Select 'Build a Custom Integration' and then select 'Slash Commands'.
For 'Choose a Command', we will enter '/startMeeting' in this example. Now you can click 'Add Slash Command Integration'.
Now scroll down to Integration Settings and for 'URL', enter the 'HTTP Post' URL from the previous section. 'Save integration', and you're all done! Now test your command by typing '/startMeeting' in Slack.
If you would like more information on Slack Slash Commands, here are the Official Docs.
Comments
Please log in or sign up to comment.