We've just migrated from the old Teams webhooks to...
# ask-community
o
We've just migrated from the old Teams webhooks to the new Teams workflows for handling notification. I've created a block which works when I use it in a Prefect flow:
teams_webhook_block = MicrosoftTeamsWebhook.load("teams-analytics")
teams_webhook_block.notify("Hello from Prefect!")
However, when I try to use this block in an automation in Prefect Cloud, I get the following error when looking at the event feed:
Copy code
"notification_log": "[ERROR]: There are no service(s) to notify"
How do I debug this? We're running the latest version of Prefect (3.0.2) and I re-registered the notification blocks (using prefect block register --module prefect_aws.credentials) to update them before configuring them. Edit: I created a Github issue https://github.com/PrefectHQ/prefect/issues/15404
l
@Nate Hello there ... I saw a thread in a archived channel at 5 sep about this ... Any news about this ? Its look like a problem in a old version of pymsteams on prefect side ... I tested my teams webhook ... and everything worked well on my side. Please, I need that func working to warn me about problems on prefect ...
@Bianca Hoch As well ... if its possible to help.
b
Hello Leo and Oscar, thanks for raising this! I'm going to get more clarification for you. My understanding is that the MicrosoftTeamsWebhook has not been switched over yet in Prefect Cloud. The intent is to complete the transition once Microsoft deprecates the older style of webhooks completely, to avoid breaking existing webhooks for users that are still on the older pattern.
Other teams have had success using a standard webhook request to send notifications to teams, at least until we're able to make the switch in Cloud
Something like this, and you'd replace the URL with yours (ie:
"<https://prod-XX.REGION.logic.azure.com:443/workflows/YOUR_WORKFLOW_ID/triggers/manual/paths/invoke?sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=YOUR_SIGNATURE>"
)
o
Ah, interesting. I'll try it out tomorrow and report back! Thanks. 🙂
🙌 1
l
Perfect @Bianca Hoch, thanks for helping!
🙌 1