Skip to content
An Example MongoDB Stitch Slack Chatbot - Slash Command to Store URLs in MongoDB
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
auth_providers Initial commit - adding Stitch App Feb 15, 2019
images Add images Feb 17, 2019
.gitignore Initial commit Feb 15, 2019
example-payload.json Add example payload json from slack Feb 17, 2019 Add stitch-cli scripts Feb 15, 2019 Add stitch-cli scripts Feb 15, 2019

How to Build a Slack Chatbot in 10 minutes with MongoDB Stitch

An Example MongoDB Stitch Slack Chatbot - Slash Command to Store URLs in MongoDB

MongoDB Stitch Slack App Flow Example

Slack is not only the fastest growing startup in history, it’s app by the same name is one of those popular communication tools in use today. We use it extensively at MongoDB to foster efficient communications between teams and across the company. We’re not alone. It seems like every developer I encounter uses it in their company as well.

One incredibly cool thing about Slack (and there are many) is its extensibility. Writing a slash command, or a standalone bot app is incredibly easy but when you combine the power of MongoDB, and specifically MongoDB Stitch’s backend as a service, the combination enables you to build an incredibly powerful chatbot in minutes. Let’s create a Slack App that stores and retrieves interesting URLs. We’ll call this app URL Stash.

In this repository, we'll provide the source code for a MongoDB Stitch service function that handles integration with a MongoDB Database from a Slack slash command. For this simple example, we'll accept URLs from a slash command and store them in a MongoDB Database using a MongoDB Stitch service.


To read the associated blog article, visit this link.


  1. Free Slack Workspace
  2. Free MongoDB Atlas Account
  3. MongoDB Cluster, Database, and Collection


Check out this video walk-through that may help you.

Building a Slack App in 10 Minutes with MongoDB Stitch

Importing the Sample Application

MongoDB Stitch enables you to export/import a pre-existing app. To do this, install the stitch-cli and create a .env file as follows:


Next, make the scripts executable:

> chmod +x deploy
> chmod +x export
You can’t perform that action at this time.