<@ULVA73B9P> are there any known issues with the M...
# ask-marvin
n
@Marvin are there any known issues with the Microsoft Teams Webhook block? I have an automation set up to send a teams notification on a flow run failure but never see any alerts come through. I've already tried re-configuring my webhook endpoint in teams.
m
thought for 361.3 seconds
Short answer: we’re not tracking any active, widespread issues with the Microsoft Teams Webhook block in Prefect 3.x right now. I couldn’t find open issues or discussions about Teams notifications failing. That said, a few common gotchas can cause “no alert received.” Here’s a focused checklist to help you isolate the problem: Quick questions to narrow it down - Are you on Prefect Cloud or self-hosted Prefect Server? - Do you see flow-run.Failed events in your Event Feed for the flows you expect? - Is your Automation showing any “Activity” entries for those events (enabled, matched, and action executed)? 1) Verify the Teams block itself (outside Automations) - Make sure you’re using a Teams “Incoming Webhook” connector (Org policies sometimes disable or rotate them). - If you reconfigured the webhook in Teams, that typically creates a new URL — be sure you updated and re-saved the Prefect block that your Automation uses. Test the block directly:
Copy code
from prefect.blocks.notifications import MicrosoftTeamsWebhook

# Replace with your saved block name
teams = MicrosoftTeamsWebhook.load("my-teams-block")

# Send a simple test message
teams.notify(
    body="Test message from Prefect",
    subject="Prefect → Teams test"
)
You should see a card appear in the Teams channel within a few seconds. If not: - Double-check the webhook URL is valid and current - Try creating a brand new Incoming Webhook connector in Teams and paste that URL into a new Prefect block - Keep the body simple (plain text) for the test Helpful CLI checks:
Copy code
prefect block ls
prefect block inspect microsoft-teams-webhook/my-teams-block
Docs: - Blocks overview - Notifications block API - CLI: prefect block 2) Validate the Automation setup - Trigger: For flow failures, it should match the event type
prefect.flow-run.Failed
. - Scope: Ensure the resource selector matches your flow/deployment (if you scoped it narrowly, it may not match). - Action: “Send a notification” → MicrosoftTeamsWebhook → points to the correct block name you tested above. - Enabled: Make sure the automation is toggled on. What to check in the UI: - Events: Confirm you see
prefect.flow-run.Failed
events when your flows fail. - Automation → Activity/Recent runs: You should see events that matched and whether the action ran successfully. If there was a problem delivering the notification (e.g., invalid URL or a 4xx/5xx), it will usually be shown here. Docs: - Creating Automations - Event triggers - States and failure events 3) Network and org-policy nuances - For Prefect Cloud Automations, notifications are sent from Prefect Cloud (not your worker), so your own egress typically isn’t involved. Teams Incoming Webhook endpoints are public; if your org restricts connectors or requires specific allowlists, that can silently block messages. - If you’re self-hosting Prefect Server and using Automations there, ensure the server can reach the exact host in your webhook URL (often something like company.webhook.office.com). Allow outbound HTTPS to that host. 4) Common pitfalls we see - Using a rotated/old webhook URL in the Prefect block after reconfiguring in Teams. - Trigger not matching your events (wrong event type or resource scope). - Automation disabled, or pointing to a different block than the one you updated. - Org policy disabled Incoming Webhooks in Teams. - Very large or unusual message templates; keep the content small/simple to test. If you’d like, share: - Whether you’re on Cloud or self-hosted - Your Prefect version - A screenshot of the Automation “Activity” view (or the exact error shown there)
- The name of the block your Automation references I can help pinpoint the exact step that’s failing and suggest the next fix.
s
Hi @Nicholas Tang I randomly saw your question here. Your issue might be related to the same one I am having: https://github.com/PrefectHQ/prefect/issues/19114