request is accepted by slack, but nothing displays -
import { IncomingWebhook } from '@slack/webhook';
// URL of your Slack Incoming Webhook
const url = process.env.vibe_wh || (() => {throw 'undefined url'})();
// Initialize the webhook with your URL
const webhook = new IncomingWebhook(url);
// The message you want to send using blocks
async function sendMessage() {
try {
await webhook.send({
blocks: [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Hello, World!* Here's a line of _italicized text_ and some `code`."
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Here's a [link](http://www.example.com)."
}
}
]
});
console.log('Message sent');
} catch (error) {
console.error('Error sending message:', error);
}
}
// Call the function
sendMessage();
the configuration for the webhook is like so:
and the received message just looks like this:
Maybe I need a variable to inject in the message? Can't figure out how to do that.

