Skip to content

fix: handle suspended Power Automate flow with retry logic and actionable error#14

Draft
BethanyJep with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-workflow-another-one
Draft

fix: handle suspended Power Automate flow with retry logic and actionable error#14
BethanyJep with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-workflow-another-one

Conversation

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown

The send-to-power-automate job was failing because the Power Automate flow trigger was in a Suspended state, causing the webhook to return HTTP 400 (WorkflowTriggerIsNotEnabled). The workflow had no retry logic and no error parsing, so it failed immediately with a generic message.

Changes

  • Retry logic: Up to 3 attempts with exponential backoff (5s → 10s → 20s) before giving up, covering transient HTTP failures
  • Non-retryable error detection: Parses the JSON response to detect WorkflowTriggerIsNotEnabled and exits immediately with an actionable message instead of retrying uselessly:

    Power Automate flow is suspended and must be re-enabled before it can accept requests. Go to Power Automate, find the flow, and turn it on.

  • Improved final error: On exhaustion, reports the last HTTP code and attempt count
ERROR_CODE=$(echo "$RESP_BODY" | jq -r '.error.code // empty' 2>/dev/null || true)
if [ "$ERROR_CODE" = "WorkflowTriggerIsNotEnabled" ]; then
  echo "::error::Power Automate flow is suspended and must be re-enabled..."
  exit 1
fi

The Power Automate flow itself still needs to be re-enabled in the portal — the suspended trigger is a configuration issue on the Power Automate side that must be resolved there.

Original prompt

Fix the failing GitHub Actions workflow send-to-power-automate
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 65542890559
Job URL: https://github.com/golclinics/discussions/actions/runs/22620048385/job/65542890559


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…e flow

Co-authored-by: BethanyJep <44121227+BethanyJep@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow send-to-power-automate fix: handle suspended Power Automate flow with retry logic and actionable error Mar 4, 2026
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.

2 participants