hyperdx/packages/api/src/utils/slack.ts
2023-09-12 20:08:05 -07:00

10 lines
283 B
TypeScript

import _ from 'lodash';
import { IncomingWebhook } from '@slack/webhook';
export function postMessageToWebhook(webhookUrl: string, message: any) {
const webhook = new IncomingWebhook(webhookUrl);
return webhook.send({
text: message.text,
blocks: message.blocks,
});
}