Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitade0a53

Browse files
authored
docs: add markdown fields in webhook payloads (#16542)
These changes were made in#14931 but didn't make it into therestructured docsCo-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
1 parent981cf8c commitade0a53

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎docs/admin/monitoring/notifications/slack.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ To build the server to receive webhooks and interact with Slack:
8989
returnres.status(400).send("Error: request body is missing");
9090
}
9191

92-
const {title,body }=req.body;
93-
if (!title||!body) {
94-
return res
95-
.status(400)
96-
.send('Error: missing fields: "title", or "body"');
92+
const {title_markdown,body_markdown }=req.body;
93+
if (!title_markdown||!body_markdown) {
94+
return res
95+
.status(400)
96+
.send('Error: missing fields: "title_markdown", or "body_markdown"');
9797
}
9898

9999
constpayload=req.body.payload;
@@ -119,11 +119,11 @@ To build the server to receive webhooks and interact with Slack:
119119
blocks: [
120120
{
121121
type:"header",
122-
text: { type:"plain_text", text:title },
122+
text: { type:"mrkdwn", text:title_markdown },
123123
},
124124
{
125125
type:"section",
126-
text: { type:"mrkdwn", text:body },
126+
text: { type:"mrkdwn", text:body_markdown },
127127
},
128128
],
129129
};

‎docs/admin/monitoring/notifications/teams.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ The process of setting up a Teams workflow consists of three key steps:
6767
}
6868
}
6969
},
70-
"title": {
70+
"title_markdown": {
7171
"type":"string"
7272
},
73-
"body": {
73+
"body_markdown": {
7474
"type":"string"
7575
}
7676
}
@@ -108,11 +108,11 @@ The process of setting up a Teams workflow consists of three key steps:
108108
},
109109
{
110110
"type":"TextBlock",
111-
"text":"**@{replace(body('Parse_JSON')?['title'], '"', '\"')}**"
111+
"text":"**@{replace(body('Parse_JSON')?['title_markdown'], '"', '\"')}**"
112112
},
113113
{
114114
"type":"TextBlock",
115-
"text":"@{replace(body('Parse_JSON')?['body'], '"', '\"')}",
115+
"text":"@{replace(body('Parse_JSON')?['body_markdown'], '"', '\"')}",
116116
"wrap":true
117117
},
118118
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp