Webhook Notification Channel to Microsoft PowerAutomate Flow: Webhook responded with HTTP status code 401

Hi there,
I configured a Microsoft PowerAutomate Flow with an input action “HTTP request is received”.
To trigger this Flow, I set up a Webhook Notification Channel in NR.

When sending a Test Notification, New Relic reports:

{
response: 200,
Unable to invoke Webhook. Webhook responded with HTTP status code 401.
}

On the Microsoft Flow however, I do not even see that a request was tried to be sent.

Here’s the Payload I use on New Relic:

  • HTTP POST URL
    https://prod-39.westeurope.logic.azure.com:443/workflows/XXXXXXXXXXXXXXXXXXXXX/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=z_XXXXXXXXXX-k

  • Custom Header:
    Content-Type application/json

JSON

{
  "policy_name": "$POLICY_NAME",
  "violation_chart_url": "$VIOLATION_CHART_URL"
}

Here’s the schema I added to the HTTP Request Input Action on my Power Automate Flow:

Request Body JSON Schema

{
    "type": "object",
    "properties": {
        "policy_name": {
            "type": "string"
        },
        "violation_chart_url": {
            "type": "string"
        }
    }
}
  • Method: none

I tried to adapt the solution for Google Chat from the topic reply here: New Relic alerts not working with google chat - #22 by marcelo1leon

But that didn’t work neither.

Anyone got any ideas, what is needed to get this up and working?

Hi @oraduner

Welcome to the community, and thanks for posting your question!

Although we can’t help much with specific instructions for setting up webhooks with 3rd party systems, I do have some (hopefully) helpful information to share with you.

  • When you do a test notification, the first line (usually response: 200,) indicates that our system successfully sent the test notification. The 2nd line (in your case, Unable to invoke Webhook. Webhook responded with HTTP status code 401.) is the response that our system got back from the endpoint.
  • This series of articles written by a colleague of mine may help to better understand how New Relic webhook notification channels work and suggests a few ways to troubleshoot them.
  • Although you are not using MS Teams, there is a thread where users discuss the challenges and solutions they had setting up a webhook to integrate with that product. This may help to inspire new solutions for integrating with MS PowerAutomate Flow.

I hope you find these resources useful!