Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

A Flask app to document and test Slack's interactive messages.

Notifications You must be signed in to change notification settings

datadesk/slack-buttons-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Buttons

A Flask app to document and test Slack's interactive messages.

Slack Buttons Tutorial

Check out our Source article explaining how we use Slack buttons in our newsroom and how you can make your own.

Getting Started

Create a virtualenv to store the codebase.

$ virtualenv slack_buttons

Activate the virtualenv.

$ cd slack_buttons
$ . bin/activate

Clone the git repository from GitHub.

$ git clone https://github.com/datadesk/slack-buttons-example.git repo

Enter the repo and install its dependencies.

$ cd repo
$ pip install -r requirements.txt

Fill in your Slack app's credentials in the app file.

Now run the test server and check out the results on localhost:5000

$ python app.py

Testing Slack Buttons

This Flask app has three routes:

  • '/': index is just to test to make sure the server is running
  • '/test-add-story': test URL will post a test story in your Slack channel
  • '/slack': webhook accepts POST requests from your Slack app after a button has been clicked

About

A Flask app to document and test Slack's interactive messages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages