https://prefect.io logo
Title
d

Dennis Hinnenkamp

04/05/2022, 7:41 AM
Hi, I have set up a cloud hook that is supposed to notify me via MS Teams when a run is successful. Unfortunately, I don't get any notification and the test call doesn't seem to work either. I also use the same webhook URL in the Airbyte installation, the message also arrives in MS Teams, so that can't be the problem. Can anyone help here? By the way, I use Prefect Server. Thanks in advance
1
a

Anna Geller

04/05/2022, 9:56 AM
Can you try testing whether your Teams webhook URL is working by running it with
requests
without Prefect?
<http://requests.post|requests.post>(url="teams_webhook_url", data=json.dumps({"text": result}))
I don't have Teams installed so can't reproduce, but Teams has this menu that allows you to check webhooks configuration and test whether a hook is working
d

Dennis Hinnenkamp

04/05/2022, 11:20 AM
The request via plain Python works like a charm
a

Anna Geller

04/05/2022, 11:49 AM
This is weird. I can open an issue in Server to investigate. @Marvin open "Cloud hooks not working with Microsoft Teams" in server
a

Anna Geller

04/05/2022, 11:50 AM
Feel free to add more details or add Server UI screenshots directly in the GitHub issue
💪 1
m

Miguel Angel

05/16/2022, 2:34 PM
Any updates regarding this issue?
d

Dennis Hinnenkamp

05/16/2022, 2:58 PM
unfortunately not
a

Anna Geller

05/16/2022, 3:17 PM
if you're interested, feel free to contribute
m

Miguel Angel

05/16/2022, 3:39 PM
Absolutely, I was using slack webhooks that worked like a charm, however, we migrated to migrated to MS Teams
@Anna Geller, does the
TeamsWebhookNotificationAction
has any notification type any api reference guide?
a

Anna Geller

05/17/2022, 11:48 AM
you are looking at the wrong abstraction @Miguel Angel -
TeamsWebhookNotificationAction
is for Prefect Cloud and the code for that is not publicly available. The issue is about the webhook, not Automation. Webhook code is available in the server repo https://github.com/PrefectHQ/server
a

aaron

05/20/2022, 6:39 PM
I ran into this problem as well and dug into it a bit — it’s due to the format of the payload that Prefect posts to the webhook (it’s missing fields that Teams requires for its webhooks). I get
Summary or Text is required.
if I try to post the same payload to the Teams webhook using Postman.
a

Anna Geller

05/20/2022, 6:46 PM
perhaps you can add your notes to the GitHub issue? this Server webhook issue needs contributor to get fixed - I don't even have Teams to QA this atm, sorry
a

aaron

05/20/2022, 7:04 PM
Yes I can do that, no problem. I know there is a Teams-specific automation in Cloud; with the way the webhook payload is currently formatted that’s basically what we’d need to do in Server.
👍 1