Code Monkey home page Code Monkey logo

mongodb-stitch-slack-urlstash's Introduction

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.

Article

To read the associated blog article, visit this link.

Requirements

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

Video

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:

export STITCH_API_KEY=<API_KEY>
export STITCH_USERNAME=<CLOUD_USERNAME>
export STITCH_APPID=<APPID>

Next, make the scripts executable:

> chmod +x deploy
> chmod +x export

mongodb-stitch-slack-urlstash's People

Contributors

mrlynn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.