QR Code Generator for Slack
QR Codes are all the rage these days! Some might say they're even having a moment.
Need one for a product SKU? A link to something important? Just want to show off?
Perhaps you just want a QR Code to Rick Roll your teammates in a roundabout way?
This source acts as a template for your very own qr
command in Slack.
Depending on how you link your Slack workspace, the command will be available as
/cmd qr [text]
or /qr [text]
.
Turns out you can build a QR Code Generator for Slack in just 7 lines of code and launch it
in about 30 seconds. The full endpoint code is about 18 lines but includes
some whitespace and boilerplate, you can check it out here.
How it Works
This App is set up to respond to the /cmd qr
command in Slack (or /qr
, if you create a custom app),
followed by any text or URL you want to convert.
For example, in any channel you can write /cmd qr http://www.threesided.ca/
to automatically generate a QR
code from the link.
This command uses the qrcode.generate API Connector,
making the whole process a breeze!
This QR code image is then directly uploaded to your Slack channel using the
slack.channels.files.create method.
That's it!
Thanks for checking out this Source! Follow the Autocode team on Twitter @AutocodeHQ for updates.
If you have any questions, please join our community Slack channel - you can get an invite from under the community tab in the topbar of this page.