コンテンツにスキップ
#0149
CurlExec

A Slack slash command without a webhook server

You want /deploy staging to work in Slack. Standard path: register the slash command, then host your own webhook receiver: a service that takes the POST, verifies the signature, acks within three seconds, posts results back. Most of the work is the receiver, not the deploy.

You skip the receiver. Point Slack's slash-command target at a hoody-curl URL that wraps a POST to your exec script. Slack POSTs. The exec script reads the parameters, runs the deploy, returns a one-line summary as the response body.

Slack renders that as the channel reply: "deploy started, running build…"

No service between Slack and your container. No port to leave open. No process to restart. One URL, registered once.

The slash command's backend is a URL, not a service.