Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

A Cloud Functions proxy for Slack slash commands that does request validation and publishes the payload to Cloud Pub/Sub.

License

Notifications You must be signed in to change notification settings

alexferl/slack-command-proxy

Repository files navigation

Slack Command Proxy

A proxy for Slack slash commands that does request validation and publishes the payload to Cloud Pub/Sub.

Using

git clone https://github.com/admiralobvious/slack-command-proxy
cd slack-command-proxy
  1. Modify config.json with your own settings.

  2. Create a Pub/Sub topic following this pattern:

gcloud pubsub topics create slack-command-proxy-myteam-mycommand
  1. Deploy Slack Command Proxy:
gcloud functions deploy SlackCommandProxy --runtime go113 --trigger-http --set-env-vars "GCP_PROJECT=your-project-id" --allow-unauthenticated

Why

  • You work in an environment with more than one slash command
  • You're already hosting your slash commands on GCP
  • Your slash commands are implemented in more than one programming language
  • Your slash commands are usually simple enough that you don't want to bundle a full-fledged Slack API library in your code just to do request validation
  • Some of your slash commands may be written by less experienced (or who aren't primarily) developers and you'd rather they don't have to deal with request validation
  • You don't wanna have to add a new service, open incoming ports and so on every time you add a new slash command
  • You want the incoming requests to have a persistence layer

Credits

GCP Go Samples - functions

GCP Go Samples - pubsub

About

A Cloud Functions proxy for Slack slash commands that does request validation and publishes the payload to Cloud Pub/Sub.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages