Skip to content

Add Power Automate (Workflows/MS Teams) alternative url support#1407

Merged
caronc merged 6 commits intocaronc:masterfrom
LaFeev:powerautomate_url_pattern
Sep 11, 2025
Merged

Add Power Automate (Workflows/MS Teams) alternative url support#1407
caronc merged 6 commits intocaronc:masterfrom
LaFeev:powerautomate_url_pattern

Conversation

@LaFeev
Copy link
Contributor

@LaFeev LaFeev commented Sep 2, 2025

Description:

Related issue (if applicable): #1405

Adds support for the (new?) power-automate webhook URL pattern:
https://host:PORT/powerautomate/automations/direct/workflows/ABCD/triggers/manual/path/...sig=DEFG

The native URL (as above) is supported, maintaining backward compatibility with the existing/legacy Workflows native URL. A query parameter and internal flag were introduced to manage control of the URL pattern. e.g.:
workflow://host:443/WFID/SIGNATURE/?power_automate=yes

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use tox -e lint and even tox -e format to autofix what it can)
  • Test coverage added (use tox -e minimal)

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/LaFeev/apprise.git@powerautomate_url_pattern

# Test out the changes with the following command:
apprise -vvvv -t "Test Title" -b "Test Message" \
  workflow://<host>:443/<WFID>/<SIG>/?pa=yes
# replace with your host/workflow ID/signature from a power-automate webhook

@caronc
Copy link
Owner

caronc commented Sep 6, 2025

Thank you for the PR!

Just clean up test coverage/linting

# The following may fix all of your issues:
tox -e format

@codecov
Copy link

codecov bot commented Sep 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.65%. Comparing base (969c8db) to head (d5d62b6).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1407   +/-   ##
=======================================
  Coverage   99.65%   99.65%           
=======================================
  Files         174      174           
  Lines       22519    22554   +35     
  Branches     3582     3587    +5     
=======================================
+ Hits        22441    22476   +35     
  Misses         70       70           
  Partials        8        8           
Files with missing lines Coverage Δ
apprise/plugins/workflows.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@caronc
Copy link
Owner

caronc commented Sep 8, 2025

It looks like your PR is popular, but still not passing due to line wraps. Should be straight forward to fix and push again! 🙏

@LaFeev
Copy link
Contributor Author

LaFeev commented Sep 8, 2025

Thank you for the PR!

Just clean up test coverage/linting

# The following may fix all of your issues:
tox -e format

Ran the various tox commands, lint and format passed without issue.

Digging into the Build RPMs failure (Here) looks like the test case I added fails when trying to use the "self" key in the meta dictionary (the only way I could see to test the internal flag I added, with existing architecture).

I believe that's an error in rest.py where it should be _self.items(), but that would imply no other test has ever used the 'self' key..?

When I run the tox -e qa command locally it does not throw any errors for the test_plugin_workflows.py for some reason, but does fail on assert isinstance(utils.time.zoneinfo("Cordoba"), tzinfo) in test_apprise_utils. Not sure if you're seeing that too, or why the AttributeError in test_plugin_workflows isn't tripping for me.

@LaFeev
Copy link
Contributor Author

LaFeev commented Sep 8, 2025

Sorry not sure what I ran the lint test against earlier, but I did find and correct some line wraps...

Also, I tracked down a couple loose ends. The new timezone feature you added leverages the IANA database via zoneinfo, but that is system dependent (apparently). I'm on Windows, and that may be the reason test_apprise_utils fails for me (see above). PR forthcoming to address that. #1411

The AppriseURLTester failure for my additions to test_plugin_workflows (this PR), comes down to some standing errors in rest.py. PR for that forthcoming as well. #1412

@caronc
Copy link
Owner

caronc commented Sep 11, 2025

Perform a git pull and your code base will be fixed. Not sure what changed recently but RUF059 related issues are failing (when they didn't before and it's impact you (despite being unrelated to your fix). I fixed them here #1413 ; after that is merged, your branch should be fine.

@caronc caronc merged commit 27091b5 into caronc:master Sep 11, 2025
15 of 16 checks passed
@caronc
Copy link
Owner

caronc commented Sep 11, 2025

Merged code; will be part of next release

@nezBRunning
Copy link

@LaFeev If you don't mind, I just posted a question about getting the new URL format to work: #1420 I might have missed something obvious.

zzstoatzz added a commit to PrefectHQ/prefect that referenced this pull request Oct 7, 2025
closes #19114

Microsoft changed the Power Automate webhook URL format in August 2025
from logic.azure.com to environment.api.powerplatform.com. This was
fixed in apprise v1.9.5 (caronc/apprise#1407).

Since the old URL format will be deprecated on November 30, 2025, we're
bumping the minimum apprise version to ensure all users have support for
the new URL format.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants