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

docs: add markdown fields in webhook payloads#16542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
EdwardAngert merged 1 commit intomainfrom14931-slack-teams-notif
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletionsdocs/admin/monitoring/notifications/slack.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -89,11 +89,11 @@ To build the server to receive webhooks and interact with Slack:
return res.status(400).send("Error: request body is missing");
}

const {title, body } = req.body;
if (!title || !body) {
return res
.status(400)
.send('Error: missing fields: "title", or "body"');
const {title_markdown, body_markdown } = req.body;
if (!title_markdown || !body_markdown) {
return res
.status(400)
.send('Error: missing fields: "title_markdown", or "body_markdown"');
}

const payload = req.body.payload;
Expand All@@ -119,11 +119,11 @@ To build the server to receive webhooks and interact with Slack:
blocks: [
{
type: "header",
text: { type: "plain_text", text:title },
text: { type: "mrkdwn", text:title_markdown },
},
{
type: "section",
text: { type: "mrkdwn", text:body },
text: { type: "mrkdwn", text:body_markdown },
},
],
};
Expand Down
8 changes: 4 additions & 4 deletionsdocs/admin/monitoring/notifications/teams.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -67,10 +67,10 @@ The process of setting up a Teams workflow consists of three key steps:
}
}
},
"title": {
"title_markdown": {
"type": "string"
},
"body": {
"body_markdown": {
"type": "string"
}
}
Expand DownExpand Up@@ -108,11 +108,11 @@ The process of setting up a Teams workflow consists of three key steps:
},
{
"type": "TextBlock",
"text": "**@{replace(body('Parse_JSON')?['title'], '"', '\"')}**"
"text": "**@{replace(body('Parse_JSON')?['title_markdown'], '"', '\"')}**"
},
{
"type": "TextBlock",
"text": "@{replace(body('Parse_JSON')?['body'], '"', '\"')}",
"text": "@{replace(body('Parse_JSON')?['body_markdown'], '"', '\"')}",
"wrap": true
},
{
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp