How to Build Serverless Slack Apps and Commands
copied
I was recently looking for articles that describe how to build custom Slack apps, bots, and commands. I found several informative articles that describe using Serverless technology for precisely creating a Slack bot (you can see this, this and this for example). These last blogs contain a lot of details, but they also cover a lot of unnecessary steps.
Create a Slack command in seconds
I want to introduce you to Nimbella Commander as the better, faster, and easier way to build Slack bots and Slack commands. Nimbella Commander requires no new accounts to set up, no command-line tools to start, and you will be done creating your first Slack command in seconds.
One-click, two Slack commands, and profit. I challenge you to find a better, faster, or easier methodology.
- Click here and install Nimbella Commander into your Slack team. I will tell you more about Nimbella Commander shortly.
- Create your first Slack command by entering the following text into your Slack prompt:
/nc command_create hello
- Run the Slack command you just created by typing the following text in your Slack prompt:
/nc hello
You may immediately run a newly created Slack command because Nimbella Commander generates boilerplate code for you. You can edit the code by clicking the link shown in your Slack team. The code editor is pictured below.
You are effectively done.
The whole process should take you no more than a minute to complete. Keep reading for more about Nimbella Commander, including how it works, and some other features it offers.
How do Serverless Slack Apps run using Nimbella Commander?
Ok, now you know how to create a Slack command using Nimbella’s commander. But you should also know that when you create Slack commands with Nimbella Commander, your code runs as a Serverless app. This means there are no servers for you to provision, manage, or operate.
In fact, Serverless means there is no infrastructure at all for you to think about. You can focus on the value you are adding to your Slack team, the way innovation should be.
You can create Slack commands using the Nimbella built-in editor which opens in your browser. No additional tools or accounts needed.
Our browser editor supports JavaScript, Python, and Go. Commander generates boilerplate code that consists of the main method which wraps the actual implementation of the command in the function called "_command".This is shown in the code editor screenshot below.
Nimbella Commander code editor available in your browser.
You can code the logic necessary to implement your command, directly in the editor.
Examples and templates of Slack Apps
There are several examples and templates available on GitHub, from a simple Slack command that echoes input parameters, to more complex ones that perform timezone conversion or retrieve worldwide COVID-19 statistics.
There are also more complex Slack apps that allow you to:
- Manage infrastructure on AWS or DigitalOcean.
- inspect your Cloud spending.
- Manage GitHub or Jira projects.
- Manage inventory in your Shopify account.
These last examples are just to name a few. All of these are readily available as open source Nimbella Commander apps you can readily install and use from your Slack workspace. Best of all, since the code is yours, you can customize the apps to your needs.
Go PRO with Slack Apps with Nimbella
If you want to create more elaborate Slack commands, install dependencies, or use other languages (e.g., PHP, Java, Swift), you can develop your Slack commands offline by creating a Nimbella account, pushing your code to GitHub and installing the commands directly from your Slack prompt.
Secrets Management and Auditing Capabilities.
We initially developed Nimbella Commander for our own needs within Nimbella. One of our earliest objectives was increasing visibility into our spending with various cloud providers. We created commands that our developers could run to see current and projected monthly cloud spending and usage. This helped us reduce our cloud expenses by over 50%.
We thought this could be useful for many other developers out there, so we open-sourced these commands and many others, on GitHub.
API keys and secrets in Slack apps
While developing the cloud spending Slack commands for our use at Nimbella, we found that we needed to handle API secrets while avoiding sharing API keys in Slack, or hard coding them in the implementations. We accomplished this by adding Secrets Management which works by uniquely encrypting API keys entirely outside of Slack, and then attaching the encrypted values to Slack commands.
When you create Slack apps with Nimbella, secrets are automatically decrypted just before commands run, so the code you write can readily use secrets and API keys, without doing additional work.
Limiting user access to certain commands when coding as a team
Another feature in Nimbella Commander is the ability to limit access to certain Slack commands through explicit access control and entitlement. An administrator must grant a Slack team member the rights to run a specific command or to edit the code for a command.
The access control management is done entirely and conveniently from Slack using slash commands built into Nimbella Commander.
Slack users may also be organized into groups for easier management of access rights. And, Nimbella Commander provides an audit log so that administrators can see which commands were created, edited, or run, and by whom.
Create your Slack App with Nimbella commander
Nimbella Commander allows you to create Slack apps, bots and commands faster than any other technology available today. It combines the power of Serverless with a superb developer experience so that you can develop and create rich Slack apps from the tools you are already using daily.
Nimbella Commander is collaborative by its very nature. Multiple developers can work together in shared Slack channels to build, debug, and share Slack apps with their teams. All without servers or infrastructure. It’s your logic, your code, your commands, and nothing else.
Share your apps with us
If you read this far, you now have all the knowledge you need to create a Slack app or command of your own, and with ease using Nimbella’s Serverless platform. What commands will you create? Tell us all about the commands you’re creating, and share your ideas and feedback with us either on Twitter, or in our community Slack.
You can read more blogs on related topics:
- How to Set up your Serverless Environment and Get Started in Less than 2 Minutes!
- How to Quickly Deploy Stateful Serverless Apps with Nimbella?
- How to Build a Serverless Slack Command in minutes?
- How to Build a Stateful Serverless Cloud Web Application?
- How to use Slack Effectively with Nimbella Commander?
Authored by: Rodric Rabbah (Twitter, LinkedIn, GitHub, Medium)
- Nimbella joins DigitalOcean
- No infrastructure, just code. Learn the simplicity of serverless
- How to Migrate from Containers to Nimbella Serverless Architecture
- Kubernetes in simple words: explained by Eric Swildens
- How to optimize Kubernetes costs with Nimbella
- Step by step guide on how to port from AWS to Nimbella
- How to build and improve your serverless APIs
- Simplifying Kubernetes For Developers
- FaaS Wars Season 2 - Step By Step Instructions
- What is Nimbella and what does it offer?
- Results and Feedback of FaaS Wars - May the FaaS Be with You!
- 28 Serverless Gurus and experts One Must Follow in 2021
- The Faas Wars Alert!
- CI/CD pipeline with GitHub Actions
- How to deploy Node.js functions on Nimbella
- Kick-Start Your Serverless Journey
- AWS re:Invent Serverless Highlights
- Opportunities in the Wake of the AWS Juggernaut
- FaaS Wars: Serverless & Virtual Robot Competition
- #DeveloperIPL Online Hackathon Results & Feedback on Nimbella's Integration for Postman
- How to connect to the 3rd party database such as MySQL at Nimbella (example in Java)
- What can you do with the Nimbella Workbench?
- Deploy your Shopify Storefront to Nimbella
- Not All Serverless Platforms Are Created Equal
- Nimbella + Netlify: Uplevel Your Development Speed
- How we learned to Jamstack, Our Caputron story | Nimbella.com®
- Commander for Microsoft Teams - Your Custom Bot that runs on your Command!
- How to Build a Stateful Cloud App on Nimbella vs. AWS
- Starter Kit and Resources to Build a Serverless Cloud Application
- How to Build Serverless Slack Apps and Commands
- How to Set up your Serverless Environment and Get Started in Less than 2 Minutes!
- How to Quickly Deploy Stateful Serverless Apps with Nimbella?
- What is Serverless Computing? 3 reasons to start now
- How to Build a Serverless Slack App in Minutes.
- How to Manage your Netlify Website from Slack?
- How to Build a Serverless Slack Command in minutes
- How to Build a Stateful Serverless Cloud Web Application?
- How to Create an Optical Character Recognition (OCR) Application?
- Development at the Speed of Innovation – Nimbella, the Serverless Cloud
- Software Security Features on Enterprise Serverless Slack Apps Enabled by Nimbella Commander
- Coronathon India’s first demo day has 18 projects to help fight COVID-19
- See the time in different cities on Slack with Nimbella Commander
- Greet your friends in their native language in Slack with Nimbella Commander
- How to Fetch your Digital Ocean Billing Info on Slack?
- How to Stay Updated with Coronavirus Statistics on Slack?
- How to Fetch your AWS Billing Info on Slack?
- Get your Datadog billing info in Slack with Nimbella Commander
- Serverless Slack Apps and Slash Commands
- How to use Slack Effectively with Nimbella Commander?
- How to Create a multi-user Chatroom Hosted on Serverless Cloud?
- Using Docker actions, running Golang, and other fun things with OpenWhisk
- The duality between serverless functions and APIs
- Serverless HTTP handlers with OpenWhisk
- Serverless functions in your favorite language with OpenWhisk
- Run Swiftly: precompiled Swift actions
- Performance debugging for serverless functions using the Cloud Shell
- Locally debugging OpenWhisk actions
- Composing functions into applications
- A Serverless Composition of Functions
- The Serverless Contract
- The dawn of the Cloud Computer
- Security and Serverless Functions