Does novu support sending messages to slack in markdown

I want to send the message in table form in a slack channel via novu. How can this be achieved?
8 Replies
Ask Inkeep
Ask Inkeep4w ago
Hi @Aayush Rathore, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Slack * How to use Novu to send notifications to a Slack channel * Chat * Glossary -----------------------------
Ask Inkeep
Ask Inkeep4w ago
Answer Novu supports sending richly formatted Slack messages using blocks, which allow for various layouts including sections, dividers, and even tables. To send a message in table form, you would typically use the "blocks" feature in Slack's Block Kit (1) . Here's an example of how you can send a Slack message with a table using Novu:
const novu = new Novu('<NOVU_API_KEY>');

await novu.trigger('slack', {
to: {
subscriberId: '<SUBSCRIBER_ID>'
},
payload: {
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: 'Here is a table:'
}
},
{
type: 'section',
fields: [
{
type: 'mrkdwn',
text: '*Column 1*'
},
{
type: 'mrkdwn',
text: '*Column 2*'
}
]
},
{
type: 'section',
fields: [
{
type: 'plain_text',
text: 'Row 1 Item 1'
},
{
type: 'plain_text',
text: 'Row 1 Item 2'
}
]
},
{
type: 'section',
fields: [
{
type: 'plain_text',
text: 'Row 2 Item 1'
},
{
type: 'plain_text',
text: 'Row 2 Item 2'
}
]
}
]
}
});
const novu = new Novu('<NOVU_API_KEY>');

await novu.trigger('slack', {
to: {
subscriberId: '<SUBSCRIBER_ID>'
},
payload: {
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: 'Here is a table:'
}
},
{
type: 'section',
fields: [
{
type: 'mrkdwn',
text: '*Column 1*'
},
{
type: 'mrkdwn',
text: '*Column 2*'
}
]
},
{
type: 'section',
fields: [
{
type: 'plain_text',
text: 'Row 1 Item 1'
},
{
type: 'plain_text',
text: 'Row 1 Item 2'
}
]
},
{
type: 'section',
fields: [
{
type: 'plain_text',
text: 'Row 2 Item 1'
},
{
type: 'plain_text',
text: 'Row 2 Item 2'
}
]
}
]
}
});
This example shows how to structure a simple table with Markdown in Slack using Novu. Adjust the text and fields content as per your table data requirements.
Ask Inkeep
Ask Inkeep4w ago
Got it. Tagging @Support for additional help.
Dima Grossman
Dima Grossman4w ago
Hi! this can be achieved with our new framework: https://docs.novu.co/echo/quickstart
Novu
Quick Start - Novu
Novu Echo, the Code-first notification workflow engine. Build advanced workflows while giving your non-technical teammates complete control over content and behaviour.
Pawan Jain
Pawan Jain4w ago
@Aayush Rathore Did you get a chance to checkout code first approach to send notifications https://docs.novu.co/framework/quickstart checkout this example on how you can send slack block messages https://docs.novu.co/framework/steps/chat#provider-overrides
Aayush Rathore
@Pawan Jain in the mentioned framework, support for node is given. I want to do this in golang. Minimum requirement is to send an embedded hyperlink in the slack chat
Pawan Jain
Pawan Jain3w ago
@Aayush Rathore code first approach is currently supported in javascript based framework libraries. If you are looking to just send hyperlink, checkout this answer https://discord.com/channels/895029566685462578/1221758432915488809/1221820631579099217
Aayush Rathore
@Pawan Jain It helps, thank you
Want results from more Discord servers?
Add your server
More Posts
Cannot open 'Layouts' tabWhen I click on Layouts on the novu dashboard, my page just blinks and go back to Workflows. I triedDoes the notification widget for React support WS service on a path?I'm deploying the self-hosted version to my infrastructure and have put API and WS services on a patNovu Headless - notifications not showing for custom subscriber IDsI have an app that accepts user's first name, last name, and first name. Then, it generates an ID siNot able to see the WEB UI on 4200I have been trying to setup the novu on my local machine after too many tries. i was able to run apiHow can I integrate in-app notifications in React Native?The Novu documentation contains integration guides for 'React' and other web apps. I need to integraGetting error "POST https://mydomain.com/api/v1/widgets/session/initialize 404 (Not Found)my .env example # Root URL REACT_APP_WS_URL=$HOST_NAME/ws API_ROOT_URL=$HOST_NAME/api DISABLE_USER_Firebase is forcing users to migrate from FCM to HTTP v1 (Does Novu supports HTTP v1)??Hi everyone I've got an email from firebase (check the attached email on the bottom) And I was wondWhere to report a broken Novu Cloud API?Looking at the support channel seeing little action, where should I report a broken API endpoint? hCannot get global preference for a subscriber (status: 400)If I try to use the endpoint `https://api.novu.co/v1/subscribers/{subscriberId}/preferences/global` Is there any way to open the notification container automatically when getting new notification?