Adaptable to Other Services: While this guide uses Slack as an example, the same pattern works for any service that accepts webhooks or HTTP POST requests, such as:
- Microsoft Teams
- Discord
- Email services (SendGrid, Mailgun)
- Project management tools (Jira, Asana, Trello)
- Custom APIs and databases
- CI/CD systems
Overview
You’ll create a webhook endpoint that receives Speckle webhook events and forwards them to Slack’s Incoming Webhooks API. This creates a bridge between Speckle events and Slack notifications. The same approach can be adapted for any other service that accepts HTTP POST requests.Prerequisites
- A Speckle project where you have admin or edit permissions
- A Slack workspace where you can create webhooks (or another service that accepts HTTP POST requests)
- A web endpoint to receive webhook events (can be a serverless function, cloud function, or traditional server)
Step 1: Create a Slack Incoming Webhook
- Go to your Slack workspace
- Navigate to Slack Apps
- Click Create New App → From scratch
- Name your app (e.g., “Speckle Notifications”) and select your workspace
- Go to Incoming Webhooks in the left sidebar
- Toggle Activate Incoming Webhooks to On
- Click Add New Webhook to Workspace
- Select the channel where you want notifications (e.g.,
#speckle-updates) - Click Allow
- Copy the Webhook URL (it looks like
https://hooks.slack.com/services/...)
Keep your Slack webhook URL secure. Anyone with this URL can post messages to your Slack channel.
Step 2: Create Your Webhook Endpoint
Create an endpoint that receives Speckle webhooks and forwards them to Slack. Here’s an example implementation:Serverless Function Example (AWS Lambda)
Here’s the same functionality as a serverless Lambda function:Step 3: Deploy Your Webhook Endpoint
Your webhook endpoint doesn’t need to be a full server - it just needs to be a publicly accessible HTTP endpoint that can receive POST requests. You can use:Serverless Functions (Recommended)
AWS Lambda:- Create a Lambda function with an API Gateway trigger
- Deploy your code and get a public URL
- Pay only for requests (very cost-effective)
- Deploy as an HTTP function
- Automatically gets a public HTTPS URL
- Scales automatically
- Create an HTTP-triggered function
- Get a public endpoint URL
- Serverless scaling
- Deploy as a serverless function
- Automatic HTTPS and scaling
- Great for simple integrations
Traditional Servers
- Cloud platforms: Heroku, Railway, Render, DigitalOcean
- Your own server: Any server with a public IP
- Local testing: Use ngrok to create a temporary public URL
Why Serverless? Serverless functions are ideal for webhooks because:
- They only run when receiving requests (cost-effective)
- Automatic scaling handles traffic spikes
- No server management required
- Built-in HTTPS support
- Pay-per-use pricing model
For production use, make sure your endpoint:
- Uses HTTPS (automatic with most serverless platforms)
- Verifies webhook signatures (see Webhook Security)
- Handles errors gracefully
- Returns 200 OK quickly (process Slack requests asynchronously if needed)
Step 4: Configure the Speckle Webhook
- Navigate to your Speckle project
- Go to Settings → Webhooks
- Click ADD WEBHOOK
- Fill in the configuration:
- URL: Your webhook endpoint URL (e.g.,
https://your-server.com/webhook) - Events: Select
model_update(this maps tobranch_updatein the payload) - Webhook name: “Slack Notifications”
- Secret: (Optional but recommended) Set a secret for signature verification
- URL: Your webhook endpoint URL (e.g.,
- Click Create
Step 5: Test the Integration
- Update a model in your Speckle project (e.g., rename it or modify its description)
- Check your Slack channel - you should see a notification
- Check your webhook endpoint logs to verify it received the event
Customizing the Message
You can customize the Slack message format to include more information or different styling:Extending to Other Events
You can extend this to notify on other events by checking differentevent_name values:
commit_create- New version createdcommit_update- Version updatedcomment_created- New comment addedissue_created- New issue created
Security Considerations
Troubleshooting
Why aren't I receiving Slack notifications?
Why aren't I receiving Slack notifications?
- Verify your webhook endpoint is accessible (test with a simple curl request)
- Check that you selected
model_updatein the Speckle webhook configuration - Verify your Slack webhook URL is correct
- Check your endpoint logs for errors
- Ensure your endpoint returns 200 OK quickly
How do I test locally?
How do I test locally?
Use ngrok to create a public URL that forwards to your local server:
- Run
ngrok http 3000(or your local port) - Copy the ngrok URL (e.g.,
https://abc123.ngrok.io) - Use this URL in your Speckle webhook configuration
- Your local server will receive webhook events
Do I need to run a server 24/7?
Do I need to run a server 24/7?
No! If you use serverless functions (AWS Lambda, Google Cloud Functions, Azure Functions, Vercel, etc.), you don’t need a running server. The function only executes when it receives a webhook request, making it very cost-effective. You only pay for the requests you receive.
Can I filter which models trigger notifications?
Can I filter which models trigger notifications?
Yes! Add conditional logic in your webhook handler:
Related Documentation
- Available Events - Complete list of webhook events
- Webhook Security - Securing your webhook endpoints
- Webhook Payloads - Understanding webhook payload structure
- Slack Block Kit - Formatting rich Slack messages