Slack Message
Send messages to Slack channels directly from the edge, powered by edge functions.
Find it on GitHub: /edgee-cloud/slack-message-component
A simple WebAssembly component that sends messages to Slack via webhook URLs. This component accepts HTTP POST requests with a message and forwards it directly to your configured Slack webhook, making it easy to send notifications from your applications to Slack channels.
Features
- Simple Message Forwarding: Accepts messages via HTTP POST and sends them to Slack
- Webhook Integration: Uses Slack incoming webhooks for reliable message delivery
- Edge Performance: Fast message processing directly at the edge
- Easy Configuration: Just provide your Slack webhook URL and endpoint path
- Real-time Notifications: Send instant notifications to your team
Getting Started
To integrate Slack messaging with your project:
- Create a Slack incoming webhook in your Slack workspace
- Open the Edgee console and navigate to your project’s Components
- Select “Add a component” and choose
edgee/slack-message
from the list of available edge functions - Configure the following settings:
- Webhook URL: Your Slack incoming webhook URL
- Path Configuration: Set the messaging endpoint path (e.g.,
/slack-message
)
- Click Save to activate the Slack messaging endpoint
Usage
Once configured, you can send messages to Slack by making POST requests to your configured endpoint:
Request Format
Message Formatting
You can use Slack’s standard message formatting in your messages:
*bold text*
for bold_italic text_
for italic~strikethrough~
for strikethrough`code`
for inline code\`\`\`code block\`\`\`
for code blocks
Simple Example
Use Cases
- System Monitoring: Send alerts for system errors or performance issues
- Form Submissions: Alert teams about new form submissions or leads
- Error Reporting: Send error reports and exceptions to development channels
- Automated Notifications: Send automated updates about system events
- Simple Team Communication: Quick notifications for various application events
Error Handling
The component provides basic error handling:
- 400 Bad Request: Invalid request format or missing message field
- 401 Unauthorized: Invalid webhook URL
- 500 Internal Server Error: Slack webhook error
For more details on Slack webhooks, refer to the official Slack webhook documentation.