...
Navigate to Project Settings
Select Automation
Select Create New Rule
Select the desired trigger to send the notification (i.e. Issue Created, Issue Updated)
Add another THEN: Add an action component
Search for and select Send web request
In the Web request URL field, enter the URL copied from MS Teams
Ensure the HTTP method is sent to POST
Set the Web request body to Custom data and use the following code block:
Code Block language json { "type":"message", "attachments":[ { "contentType":"application/vnd.microsoft.card.adaptive", "contentUrl":null, "content":{ "$schema":"http://adaptivecards.io/schemas/adaptive-card.json", "type":"AdaptiveCard", "version":"1.23", "body":[ { "type": "TextBlock", "size": "Medium", "weight": "Bolder", "text": "ISSUEIssue SUMMARYCreated: {{issue.summary}}" }, { "type": "ColumnSet", "columns": [ { "type": "Column", "width": "auto", "items": [ { "type": "Image", "url": "{{reporter.avatarUrls.32x32}}", "size": "Small" } ] }, { "type": "Column", "items": [ { "type": "TextBlock", "weight": "Bolder", "text": "{{issue.reporter.displayName}}", "wrap": true }, { "type": "TextBlock", "spacing": "None", "text": "Created "ISSUE DESCRIPTION: {{issue.created.mediumDateTime}}", "isSubtle": true, "wrap": true } ], "width": "stretch" } ] }, { "type": "TextBlock", "text": "{{issue.description}}", "wrap": true } ] } } ] }
In the Headers, set
Content-Type
toapplication/json
Select Turn on rule (top-right), then name your new automation
Select Turn On Rule to save