cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem Notificactions - Webhook Google

jfuentes
Visitor

Hi Team,

 

I am integrating Problem Notifications into a Google espace webhook, but I am getting an http 400 error

"Invalid JSON payload received"

These are the steps I have taken:

Create space on google.
Create webhook integration in Google space.
Create the Problem Notifications integration in Dynatrace.
I paste the Webhook.
Then I give test notifications and I get error 400

Does anyone know what could be happening or what needs to be done for it to work? or failing that if it is not compatible.

 

It is the format of webhook.

https://chat.googleapis.com/v1/spaces/XXXXXXXX/messages?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXX...

jfuentes_0-1711052640424.png

jfuentes_1-1711052667114.png

 

 

 

error

Custom Integration test failed

Reason: Invalid HTTP status code
HTTP Response Code: 400 - Bad Request
HTTP Response Body:
{ "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \"State\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"ProblemID\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"ProblemTitle\" at 'message': Cannot find field.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "message", "description": "Invalid JSON payload received. Unknown name \"State\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"ProblemID\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"ProblemTitle\" at 'message': Cannot find field." } ] } ] } }

jfuentes_2-1711052678820.png

 

 

 

All this in SAAS.

Greetings Dynatrace Lovers.

 

 

5 REPLIES 5

ChadTurner
DynaMight Legend
DynaMight Legend

Have you tried to rebuild this custom webhook from scratch? I've used the webhook tester that included the payload as you have shown and it works no problem. I'm curious if the test is failing because the payload is essentially empty in terms of those values. 

Have you tried to save the integration and trigger a problem card to see what payload is being sent/received? 

-Chad

AurelienGravier
DynaMight Champion
DynaMight Champion

Hello @jfuentes Same issue here, did you solve your issue ?

Thx u

Observability consultant - Dynatrace Associate/Pro/Services certified

jfuentes
Visitor

Hi,

The problem was the payload, I don't know the reason but Google doesn't accept the structure by default.

{
"text": " *{ProblemTitle}*\n`{ImpactedEntityNames}`\n{ProblemDetailsText}\n"
}

Thank you. 

Thank you for your feedback, I came to the same conclusion as you after coming across this recent blog article :

https://www.dynatrace.com/news/blog/chatops-integration-with-dynatrace/

{
"text": " *{State}-{ProblemID}-{ProblemTitle}*\n`{ImpactedEntityNames}`\n{ProblemDetailsText}\n{ProblemURL}\n{Tags}"
}


Bye 

Observability consultant - Dynatrace Associate/Pro/Services certified

Peter_Youssef
Champion

Hi @jfuentes 

We have confronted the same scenario before, mainly the message isn't related to connection or authentication errors.

The main point is working around the accepted custom payload with the target integrated technology.

BR,

Peter

Featured Posts