N
Novu•3mo ago
Sensei

Different template for different chat providers

Hi . I would like to know if we can have a different "template" (chat message) for teams and slack . We want to send different message as slack and teams have different ways to manage carrier returns, links , etc... It could be (if at least one is possible): - Ability to setup a different template based on the chat provider (1 for teams, 1 for slack) or - Ability to send a Paypload by chat provider . (1 for teams, 1 for slack) We can't setup two different workflow as this will not change anything because once we integrate a the "chat provider" all chat providers configured will be notified :/
3 Replies
Pawan Jain
Pawan Jain•3mo ago
@Sensei Trigger overrides could be helpful for your usecase https://docs.novu.co/platform/integrations/trigger-overrides
Trigger Overrides | Novu Documentation
Learn how to customize the behavior of your workflows at trigger time
Sensei
SenseiOP•3mo ago
Hi @Pawan Jain , thanks for you reply How to know exactly the "field" / json property to fill in ? For instance, the documentation is talking about "slack blocks", do i need to use the "type" , "elements" and "block id" fields coming from the slack documentation ? https://api.slack.com/reference/block-kit/blocks#rich_text If there is example of teams and slack usage for trigger overrides, i'm interested in 🙂
Slack API
Reference: blocks
A comprehensive breakdown of blocks used to lay out app surfaces.
Pawan Jain
Pawan Jain•3mo ago
@Sensei here is the code example for slack
novu.trigger({
workflowId: "workflowId",
to: "subscriberId",
payload: {
key: "value",
},
overrides: {
providers: {
slack: {
text: "A new post has been created",
blocks: [
{
type: "section",
text: {
type: "mrkdwn",
text: "A new post has been created",
},
},
],
},
},
},
});
novu.trigger({
workflowId: "workflowId",
to: "subscriberId",
payload: {
key: "value",
},
overrides: {
providers: {
slack: {
text: "A new post has been created",
blocks: [
{
type: "section",
text: {
type: "mrkdwn",
text: "A new post has been created",
},
},
],
},
},
},
});
We support this for slack, but we don't support this for msteams

Did you find this page helpful?