As a newcomer to the world of remote working, I’ve begun to realise that the most important tool in remaining part of a work’s culture (and to stay sane!) is communication. By being proactive in your communication with your fellow workers you don’t lose the feeling of being ‘part of the team’. In today’s modern world, keeping communication channels open has never been easier thanks to the vast array of tools and tech available.
One particular tool that has gained particular attention is the globally successful communications tool, Slack. Slack (in case you’re unaware) is pretty much the standard in workplace / team communication. Along with being a great messaging platform, Slack comes with a lot of tech-savvy tools. Most importantly however, Slack provides the ability to write custom functionality into your team’s group (also known as, bots).
Bots have become the next ‘in’ thing; with companies like Facebook & Microsoft writing their own APIs for (regardless of how successful they are in implementing artificial intelligence). Knowing this I thought of something that would be pretty neat. Wouldn’t it be awesome if my co-workers could declare their physical location, to let others know where they’re working from? From this I deduced the following idea:-
“Create a Slack slash command bot that allows users to ‘check-in’ and share with their team or co-workers where they’re working from.”
In Slack parlance, a ‘slash’ command is the ability to run a particular command, identified by a particular name & preceeded by a forward slash i.e /collapse, which closes all open images and other forms of media in a particular channel. So with this in mind, I cracked on.
First thing I had to do was decide upon the technologies that I needed:
1. It had to run like a slash command, which in the world of Slack means it needed to respond to HTTP requests over the POST method - I needed a simple web server; for this I created it using Hapi.js (https://github.com/hapijs/hapi).
2. It had to have the ability to query a maps API and return an image of a localised map, based on a text query - for this I used the Google static maps API. To use this I also had to setup a Google developer key & give it the right privileges.
After some tinkering and coding, I tested my newly created bot against a slack group I belong to with a really useful tool for creating tunnels to a local server - Ngrok
(https://ngrok.com/). With this, I could provide Slack with a URL with which my slack bot was running at. Eventually (after some debugging and tidying up), I ended up with the following response appearing in my Slack group:
There it is! Luckily the Googleplex can be identified by a single word when querying the Google maps API; you may have to be a bit more specific when you want to give a full address (although postcodes work brilliantly).
This is just one of many ways that Slack’s integration API shines - by providing distributed workers to give some ‘real-life’ insight into their work day, and to feel ‘part of the team’.
The code for this slack bot is available on my Github page (along with instructions on how to set it up) at https://github.com/joseph-norman/check-in-slack
Thanks to Joe Norman for being our guest writer this week.
We are a leading niche digital & tech recruitment specialist for the North East of England. We Specialise in the acquisition of high-performing technology talent across a variety of IT sectors including Digital & Technology Software Development.
Our ultimate goal is to make a positive impact on every client and candidate we serve - from the initial call and introduction, right up to the final delivery, we want our clients and candidates to feel they have had a beneficial and productive experience.
If you’re looking to start your journey in sourcing talent or find your dream job, you’ll need a passionate, motivated team of experts to guide you. Check out our Jobs page for open vacancies. If interested, contact us or call 0191 620 0123 for a quick chat with our team.
Back to Blog