Custom Alert Activity Functionality | Community
Skip to main content
July 10, 2025
Question

Custom Alert Activity Functionality

  • July 10, 2025
  • 1 reply
  • 353 views

Hi,

 

We would like to implement functionality to send Adobe Campaign alerts to a Microsoft Teams channel via webhook: Create an Incoming Webhook - Teams | Microsoft Learn

 

How can we edit the under-the-hood functionality of the "alert" activity and the workflow supervisor "alert" for workflow failures to add a condition which triggers a webhook message via javascript?

 

  • Where is the "alert" activity executed / where is the functionality stored, and is it editable?
  • Has anyone successfully done this?

Thanks,

Skyler

1 reply

_Manoj_Kumar_
Community Advisor
Community Advisor
July 21, 2025

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); }
     Manoj     Find me on LinkedIn