Open adrukh opened 1 month ago
Thanks for the heads up. The deadline is quite ambitious, especially with many developers on holiday. This feature moving to a Premium function is classic Microsoft.
Given the download stats of this lib, we should communicate the best way to migrate to PowerAutomate and update this lib to support PowerAutomate workflows. This evening, I will review what I need to do to continue sending messages and cards to the teams.
Kindly pinging about this :)
In the meantime, I'll post my migration steps as I added the necessary support for my app. I used the occasion to switch from MessageCards
to ActionCards
posted by my app, don't think that this is a must. Please note that your AI companion can easily transform one JSON format into another to help you through this.
Before the migration, code using the amazing ms-teams-webhook
client:
const MSTeamsWebhook = require('ms-teams-webhook')
const webhookClient = new MSTeamsWebhook(webhookUrl)
await webhookClient.send({
'@type': 'MessageCard',
'@context': 'https://schema.org/extensions',
summary: 'Lorem Ipsum',
sections: [
{
startGroup: true,
activityImage: someIconUrl,
activityTitle: 'Hooray, it works!',
activitySubtitle: welcomeMessage
}
]
})
After the migration, using got
, a plain HTTP client:
await got.post({
url: powerAutomateWorkflowsURL,
json: {
type: 'message',
attachments: [
{
contentType: 'application/vnd.microsoft.card.adaptive',
content: {
$schema: 'http://adaptivecards.io/schemas/adaptive-card.json',
type: 'AdaptiveCard',
version: '1.3',
body: [
...
]
}
}
]
}
})
You can use https://adaptivecards.io/designer/ to tweak the ActiveCard design to perfection, just note the encapsulating JSON object that you need to use as the request payload.
Good luck!
MessageCards
are no longer supported, and there’s no straightforward migration path available. Furthermore, automating the creation of new workflows is not feasible, raising concerns about the current library’s utility. With 40k downloads in the last 8 days, this breaking change will have a significant impact on users. We need to strategize on how to prepare users for this transition.
Plan:
Release Version 3.0.0 (Breaking Change) - End of Week
webhook.sendCard({schema})
with support from @microsoft/adaptivecards-tools
-webhook.sendRawCard({schema})
from adaptivecards.iowebhook.sendText("plain text")
Deprecate Versions < 3.0.0 (End of August)
Codemon Migration Tool (End of August)
MessageCards
to AdaptiveCard
. Consider using an embedded AI for this process to streamline the conversion. Validate against the JSON schema https://adaptivecards.io/schemas/adaptive-card.jsonCreate Migration PRs (End of Year)
@adrukh Can you provide more details how you migrated your workflow? Think that could be interesting for many
@adrukh Can you provide more details how you migrated your workflow? Think that could be interesting for many
So I basically fed my MessageCard
payload into chatGPT & Claude.ai, asking them to suggest the closest ActionCard
payload. It worked well, I made some final touches directly in the designer. Some JavaScript <-> JSON
conversions, again relying on the AI agents, and I was done!
Here is a pre-release version representing the v3 of the ms-teams-webhook (#34 ) Feel free to test and give feedback.
ms-teams-webhook v3.0.0 (PREVIEW): npm i https://pkg.pr.new/waigel/node-ms-teams-webhook/ms-teams-webhook@042eaf4
The first version of the messagecard converter is ready, please test it and give feedback here.
@adrukh Could you please test the converter to see if you obtain a similar optical result? Unfortunately, I don’t have the necessary “test data” to verify it myself.
@waigel apologies, but I also lack the environment in which I can test the visual aspects by myself...
According to this article, MS are retiring webhook connectors in 2024. Specifically, new integrations won't be possible after August 15th,
and existing webhooks will stop working after October 1st. EDIT: existing webhooks will work until Dec 31st 2024. There is also an option to extend the deprecation until the end of 2025 by updating the webhook URL. See the article for more details.The article calls out PowerAutomate Workflows as the suggested solution.
Question - is there any JS client support for PowerAutomate Workflows? I think all users of this webhook client would be interested to ease with the migration.