I am not receiving any payload from the generated webhook

Hi team,

I am creating a custom app with the logic of updating the private note and a ticket status based on the external event. I followed your documentation and created the server-less app.

I can validate run and pack the server-less app and I have installed successfully in the custom app section. I can also run and get successful results while running local server. but when installing and run the app with the Freshdesk generated Webhooks, I am not receiving any payload.

Also, I am unable to get the console logs as well. I suspect the generated webhook is invalid. In the Azure end, i can see the unsuccessful payload attempt message.

In the generate URL section, I just generate and print the same in log section get that added in the external application.

Everything is working fine(adding notes and changing status) when I use locally generated webhook using the ngrok.

I suspect the issue is only with the freshdesk generated webhook. or is there any error in the structure of my code and application. I am just attching my server.js file.

server file code.txt (5.1 KB)

Please check and share your thought on this. Thank you.

Hello @kesavan_muthusamy ,

doesn’t the webhook url have to be generated with the “generateTargetUrl” function?
Can you try to run this code?

onAppInstallHandler: function (args) {

    generateTargetUrl()
      .then(function (url) {
        console.log(url);
        renderData();
      },
        function (error) {
          console.error("Something went wrong while generating webhook", error);
          renderData({ message: "Installation failed." });
        });
  }

https://developers.freshworks.com/docs/app-sdk/v2.3/freshdesk/serverless-apps/external-events/#register-webhook---onappinstall