일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- Nest.js
- JavaScript
- game
- class
- GIT
- mongoose
- jest
- nestjs
- 게임
- nodejs
- TypeScript
- Sequelize
- MySQL
- typeORM
- dfs
- 자료구조
- Bull
- OCR
- Express
- flask
- MongoDB
- Python
- cookie
- 정렬
- Queue
- 공룡게임
- Dinosaur
- react
- AWS
- Today
- Total
포시코딩
[MS][Teams] Incoming Webhook 본문
소개
Create an Incoming Webhook - Teams
Create an Incoming Webhook to Teams app and post external requests to Teams. Remove Incoming Webhook. Sample code(C#, Node.js) to send card using Incoming Webhook.
learn.microsoft.com
Example JSON
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "d58200",
"title": "title",
"text": "text",
"potentialAction": [
{
"@type": "OpenUri",
"name": "Name",
"targets": [
{
"os": "default",
"uri": "https://www.example.com/"
}
]
}
]
}
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "For Samples and Templates, see [https://adaptivecards.io/samples](https://adaptivecards.io/samples)"
}
]
}
}
]
}
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "Request sent by: Megan"
},
{
"type": "Image",
"url": "https://c.s-microsoft.com/en-us/CMSImages/DesktopContent-04_UPDATED.png?version=43c80870-99dd-7fb1-48c0-59aced085ab6"
},
{
"type": "TextBlock",
"text": "Sample image for Adaptive Card.."
}
]
}
}
]
}
Card Builder
https://dev.teams.microsoft.com/
Developer Portal
dev.teams.microsoft.com
위에서 만든 예시의 경우
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": // here
}
]
}
만든 후 생성된 코드를 'here' 부분에 넣어 사용하면 작동한다.
https://adaptivecards.io/samples/
Samples and Templates | Adaptive Cards
Samples and Templates These samples are just a teaser of the type of cards you can create. Go ahead and tweak them to make any scenario possible! Important note about accessibility: In version 1.3 of the schema we introduced a label property on Inputs to i
adaptivecards.io
++
다만 위 템플릿들로 만들어진 코멘트 남기기 등의 기능에 대해서 오류가 나는데 해당 기능은 파악중
참고