Slack Message
OpenMeter Notifications enables you to send Slack messages to your team about your customer's consumption. This is done via our webhook provider, Svix's Slack integration and webhook transformations.
Setting up the Slack integration
To set up the Slack integration, visit the Svix dashboard from OpenMeter Cloud UI. On the Svix dashboard, click Add Endpoint -> Transformation template -> Report Usage to Slack.
On the endpoint creation page, connect your Slack account and pick a Slack
channel. Then, choose the entitlements.balance.threshold
event type.
Webhook Transformation
With the Slack integration set up, you can now create a webhook transformation to customize the Slack message. The transformation code is written in JavaScript and is executed on the Svix platform. See the example below for a transformation code that you can use to send a Slack message when a customer's consumption exceeds a threshold.
The Slack message looks as:
And the transformation code producing it is:
To learn more about webhook transformations, please read Svix's documentation.