Hi, I have set up a cloud hook that is supposed t...
# prefect-server
d
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
Can you try testing whether your Teams webhook URL is working by running it with
requests
without Prefect?
Copy code
<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
The request via plain Python works like a charm
a
This is weird. I can open an issue in Server to investigate. @Marvin open "Cloud hooks not working with Microsoft Teams" in server
a
Feel free to add more details or add Server UI screenshots directly in the GitHub issue
💪 1
m
Any updates regarding this issue?
d
unfortunately not
a
if you're interested, feel free to contribute
m
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
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
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
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
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