博客 Engineering

Restoring Microsoft Teams Notifications in Prefect for New Power Automate URLs

英文文章. New Power Automate workflow URLs broke Prefect's Teams notifications. The merged fix raises the apprise floor and tests both new URL shapes.

PythonPrefectHQ/prefectnotificationsdependenciesMicrosoft Teams

Sometimes the fix is upstream already, and the work is pinning the right version and proving it.

简短回答

Microsoft's newer Power Automate workflow URLs weren't supported by the version of apprise that Prefect allowed, so Teams notifications from Prefect automations stopped working for new workflows. Support landed in apprise 1.13.0. The fix raises Prefect's minimum apprise version to 1.13.0 in both the server and client packages, updates the lockfile, and adds tests for both new URL shapes. It was merged as PR #22908 and closed issue #22846.

The problem

Prefect is a Python workflow orchestration framework. Its MicrosoftTeamsWebhook notification block relies on apprise to parse and send webhooks.

Issue #22846, on Prefect 3.7.2, reported that newly created Teams workflows use a new URL format that the installed apprise didn't support. The reporter had traced it upstream and offered a workaround: install apprise from a specific git commit inside the Prefect server container.

The fix

-    "apprise>=1.1.0,<2.0.0",
+    "apprise>=1.13.0,<2.0.0",

The same floor was applied to client/pyproject.toml, and uv.lock moved from 1.12.0 to 1.13.0. Two new tests cover the URL shapes the issue described:

POWER_AUTOMATE_URL = "https://prod-NO.LOCATION.logic.azure.com:443/powerautomate/automations/direct/workflows/WFID/triggers/manual/paths/invoke?..."
POWER_AUTOMATE_URL_WITH_ROUTING_ID = "https://prod-NO.LOCATION.logic.azure.com:443/powerautomate/automations/direct/cu/12/workflows/WFID/triggers/manual/paths/invoke?..."

Each test checks the workflow:// URL that Prefect hands to apprise, including pa=yes and, for the second shape, route=12.

By the numbers

  • Repository: PrefectHQ/prefect, 24,107 stars (Nov 3, 2026), Python, Apache-2.0
  • Files changed: 4 (2 dependency manifests, 1 lockfile, 1 test file)
  • Lines: +46 / -6
  • Commits: 1
  • Opened: Aug 21, 2026. Merged: Aug 26, 2026. Time to merge: 4 days, 23 hours
  • Review: approved and merged by a maintainer; automated benchmarks reported no performance change

How the review went

A maintainer approved and merged the PR without requesting changes. An automated benchmark check reported that the change would "not alter performance."

常见问题解答

Is this a code change in Prefect's notification logic?

No. The fix is a dependency floor plus regression tests. The URL parsing itself lives in apprise 1.13.0.

Where can I read more?

See the pull request and the original issue.

目标

Users had a workaround that patched a running container. A version floor and two tests replace it with something that survives a rebuild.

运行闭环

把生产信号转化为已审查的修复。

开始免费试用,了解 Prilog 如何把真实事故映射到代码级 Pull Request。