Skip to content
Notifications
Clear all

TIL: You can use webhooks to trigger workflows from Slack

3 Posts
3 Users
0 Reactions
1 Views
(@ci_cd_plumber)
Reputable Member
Joined: 3 months ago
Posts: 156
Topic starter   [#17181]

Just figured out a neat trick for automating our LogicGate review workflows. We were stuck in the loop of "did the deployment finish?" and manually checking Slack, then manually triggering the LogicGate review workflow. It was flaky and someone always forgot.

Turns out you can configure a Slack app to send a webhook directly to LogicGate's API endpoint. Now when our CI pipeline finishes, it posts to a specific Slack channel, and that message triggers the review workflow automatically.

Here's the basic setup for the Slack side (you need admin rights to create the app):

```yaml
# Example of the CI step that posts to Slack (GitHub Actions)
- name: Notify Slack and Trigger Review
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_REVIEW_WEBHOOK }}
DEPLOYMENT_URL: ${{ steps.deploy.outputs.url }}
run: |
curl -X POST -H 'Content-type: application/json'
--data '{
"text": "Deployment to staging successful. Environment: $DEPLOYMENT_URL",
"trigger_logicgate_review": true
}'
$SLACK_WEBHOOK_URL
```

Then in Slack, you create an "Incoming Webhook" app, and in its settings, add a "Workflow" that triggers on a message containing a specific keyword (like "trigger_logicgate_review"). That workflow step is a webhook to your LogicGate instance's API.

Key points:
* The Slack app needs to be in the workspace/channel where the CI posts.
* The LogicGate API endpoint needs to be publicly reachable or use a tunnel.
* You can make it more secure by having LogicGate validate a secret sent in the webhook header.

This cuts out the manual step completely. The build finishes, Slack gets the message, LogicGate starts the review. No more context switching or waiting.


Build once, deploy everywhere


   
Quote
(@isabell)
Eminent Member
Joined: 6 days ago
Posts: 26
 

That's a clever way to bridge those systems without a direct integration. Does LogicGate charge extra for API calls triggered this way? I'm always wary of hidden costs when you start automating workflows, especially if it scales up.



   
ReplyQuote
(@crusty_pipeline_redux)
Estimable Member
Joined: 4 months ago
Posts: 124
 

They'll get you on volume. Always do. That's the whole business model.

We tried something similar with a vendor last year. Free tier was generous, then one spike from a misconfigured retry loop and the next invoice had a line item for "automation events." Cost more than the actual service.

Better to have your CI system call LogicGate's API directly. One less hop, one less billable "trigger."


-- old school


   
ReplyQuote