Question

Push Notification to Discord

  • 6 November 2020
  • 5 replies
  • 63 views

Hello Ladies and Gentleman,
i drove into a problem today.

I created a Push-Notification which outputs through a webhook, whenever a ticket is created, or changed, or deleted. I now would like to get these informations to Discord. Discord allows you to create a webhook URL which u technically could or should be able to paste into acumatica. But whenever i trigger the webhook, nothing gets posted inside of my Discord Server. I checked if the webhook works on pipedream. So there are definitly notifications going through the webhook.

Any ideas? I don’t know what i have to do at this point

Inside of Acumatica i get this Error Message: 

Send to target Discord failed. Message: WebHook returns not success code: BadRequest; Message: {"message": "Cannot send an empty message", "code": 50006}

or

Send to target Discord failed: WebHook returns not sucess code


5 replies

Userlevel 4
Badge +1

Hi @jwestermann17 ,

In Acumatica, to test the Push Notification using webhook generally will follow the steps mentioned in the below link to confirm that Push Notifications are working.

Link: https://www.acumatica.com/blog/tackling-an-integration-challenge-via-push-notifications-in-acumatica/ 

Hope this may help you to get this issue resolved.

 

Best Regards, 
Naveen B

Hey @naveenb74,

i followed this guide but came upon the problem that webhookinbox didn’t want to create a webhook link for me, so i switched to pipedream. I indeed saw, that the webhook is working and pipedream received data. But Discord won’t, so i am a bit… Confused.

Regards

Userlevel 1



Inside of Acumatica i get this Error Message: 

Send to target Discord failed. Message: WebHook returns not success code: BadRequest; Message: {"message": "Cannot send an empty message", "code": 50006}

or

Send to target Discord failed: WebHook returns not sucess code

I found this post here: https://stackoverflow.com/questions/54879325/i-keep-receiving-an-empty-message-error-when-trying-to-post-a-webhook  which suggests JOSN being sent could be invalid for some reason.  Can you check if the JSON being sent/received at Discord is valid?

Hello!
How do i check this?

Discord creates a Webhook Link on their own by just a button pressing.
Which means i didn’t program the webhook itself. I only tried to insert the Link into the Push-Notification field to send a Push-Not to my Discord webhook.. 

So sorry if my question might seem a bit odd, but how to i check if the json sent from Acumatica is valid? 

If i check it on webhook.site i can see this (JSON is Valid)
 

{
"Inserted": [],
"Deleted": [
{
"CaseID": "000022",
"Subject": "test",
"Status": "New",
"Severity": "Medium",
"Priority": "Medium",
"AccountName": "Muster GmbH",
"DateReported": "2020-11-12T13:26:18.467",
"ClassID": "STANDARDTI",
"EmployeeLogin": null,
"OwnerName": null,
"Contract": null,
"ContactName": "Westermann Jannik, Herr",
"LastModifiedOn": "2020-11-12T13:26:56.787"
}
],
"Query": "DB-Cases",
"CompanyId": "Demo",
"Id": "28d00bb5-aa9c-43ff-b221-1206e957ad06",
"TimeStamp": 637407844167787833,
"AdditionalInfo": {
"PXPerformanceInfoStartTime": "11/12/2020 13:26:56"
}
}



Greetings
 

Userlevel 1

Hello!
How do i check this?

 

JSON seems correct. Have you checked with Discord support about this problem?

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved