Forum Discussion
Regardless of the method I am getting the following error:
{
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unexpected token.\ntype=alert&status=te\n^",
"status": "INVALID_ARGUMENT"
}
}- Anonymous
What does the payload of your integration look like?
I’ll be 100% honest I am at square one and was just trying to make sure the listener was receiving data. In the docs it looks like I can write my own JSON to deliver and use the variables? Ideally would like to send in native card format like what is shown here: https://developers.google.com/chat/api/guides/message-formats/cards
- tswisdomLM Conqueror
From the information available, it would appear the issue here is that alert metadata is being passed as JSON tokens, which aren’t natively recognized by Google. Instead it would likely need to be passed as the value of one or more widgets per Google’s card message structure.
- Anonymous
In the docs it looks like I can write my own JSON to deliver and use the variables?
Yep, you just need to specify the JSON you want to send in your payload. You can insert any token from the alert into the JSON. What you can’t do is gracefully handle null values or missing tokens (because of different alert types).
Have you mocked up the POST in postman? That would let you get the JSON payload fine tuned and working, then you can move that into LM and replace the values with tokens.
Related Content
- 8 years ago
- 4 years ago