Hello @SkylerQu2
With Alert activity you can use a javascript activity to send an alert to Microsoft teams.
Here is the sample code you can use in Javascript activity.
var webhookUrl = "https://xxxxx.webhook.office.com/xxxxxxxxx";
// Create the payload
var formatted_Card_Payload = {
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: "Submitted response:" + response
}
]
}
}
]
};
// Convert to JSON string
var payloadString = JSON.stringify(formatted_Card_Payload);
// Create request
var xhr = new HttpClientRequest(webhookUrl);
xhr.header["Content-Type"] = "application/json";
xhr.method = "POST";
xhr.body = payloadString;
try {
var response = xhr.execute();
logInfo("Webhook sent. Response code: " + response.code);
logInfo("Response body: " + response.body);
} catch (e) {
logError("Error sending webhook: " + e);
}