Webhook 방식으로 Jira Data Center와 Microsoft Teams 메신저를 연동하는 가이드 입니다.



Microsoft Teams 메신저 작업하기

Workflow > 새흐름 선택


처음부터 만들기 선택


Microsoft Teams webhook에서 Teams 웹훅 요청 수신된 경우 선택


Anyone 선택


Json 구문 분석 선택 및 컨텐츠 스키마 입력

스키마 상세 내용은 아래 확인

{
    "type": "object",
    "properties": {
        "summary": {
            "type": "string"
        },
        "sections": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "activityTitle": {
                        "type": "string"
                    },
                    "activitySubtitle": {
                        "type": "string"
                    },
                    "activityImage": {
                        "type": "string"
                    },
                    "activityText": {
                        "type": "string"
                    },
                    "facts": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "value": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "name",
                                "value"
                            ]
                        }
                    }
                },
                "required": [
                    "activityTitle"
                ]
            }
        },
        "potentialAction": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "targets": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "uri": {
                                    "type": "string"
                                },
                                "os": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "uri",
                                "os"
                            ]
                        }
                    },
                    "@@type": {
                        "type": "string"
                    }
                },
                "required": [
                    "name",
                    "targets",
                    "@@type"
                ]
            }
        },
        "themeColor": {
            "type": "string"
        },
        "@@context": {
            "type": "string"
        },
        "@@type": {
            "type": "string"
        }
    }
}

채팅 또는 채널에서 카드 게시 추가

적용형 카드 내용은 아래 확인

{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.3",
  "body": [
    {
      "type": "TextBlock",
      "text": "🚀 **신규 이슈가 생성되었습니다!**",
      "weight": "Bolder",
      "size": "Medium",
      "wrap": true
    },
    {
      "type": "FactSet",
      "facts": [
        {
          "title": "이슈 키",
          "value": "[@{triggerBody()?['key']}](https://jira.curvc.com/browse/@{triggerBody()?['key']})"
        },
        {
          "title": "요약",
          "value": "@{triggerBody()?['summary']}"
        },
        {
          "title": "우선순위",
          "value": "@{triggerBody()?['priority']}"
        },
        {
          "title": "작성자",
          "value": "@{triggerBody()?['reporter']}"
        }
      ]
    }
  ],
  "actions": [
    {
      "type": "Action.OpenUrl",
      "title": "🔗 바로 가기",
      "url": "@{triggerBody()?['url']}"
    }
  ]
}



등록된 화면


webhook url 복사


Jira에서 작업하기

Automation에서 웹훅 등록

  • Trigger: 이슈 생성 시
  • Action: Send web request Action 사용하여 Automation rule 등록


실행 결과 화면


  • 레이블 없음