This is a Slack app that integrates with Airtable to streamline sales workflow. It uses the Bolt for JavaScript framework.
This app allows you to:
- Notify your team when a new opportunity is added to Airtable
- Notify your team when an opportunity status is updated
- Slack commands to view opportunities and update opportunity notes
This app is built using the Bolt for JavaScript framework. It uses the Airtable API to read and write data to Airtable.
Before you can run the app, you'll need to store some environment variables.
- Rename
.env.sample
to.env
- Open your apps configuration page from this list, click OAuth & Permissions in the left hand menu, then copy the Bot User OAuth Token into your
.env
file underSLACK_BOT_TOKEN
- Click Basic Information from the left hand menu and follow the steps in the App-Level Tokens section to create an app-level token with the
connections:write
scope. Copy that token into your.env
asSLACK_APP_TOKEN
.
# Install dependencies
npm install
# Run Bolt server
npm start
# Run eslint for code formatting and linting
npm run lint
manifest.json
is a configuration for Slack apps. With a manifest, you can create an app with a pre-defined configuration, or adjust the configuration of an existing app.
app.js
is the entry point for the application and is the file you'll run to start the server. This project aims to keep this file as thin as possible, primarily using it as a way to route inbound requests.
Every incoming request is routed to a "listener". Inside this directory, we group each listener based on the Slack Platform feature used, so /slack//listeners/commands
contains all the listeners for Slack commands. Each listener is a function that takes a payload
and context
as arguments. The payload
is the data sent from Slack, and the context
is a set of utilities provided by Bolt.
This directory contains all the code for building Slack user interfaces.
This directory contains all the code for interacting with Airtable. It contains a base.js
file that exports a configured Airtable base, and a records.js
file that exports functions for interacting with Airtable records.