Hi,
I’m trying to create a global app that sends the payload of the event to webhook.site
. The app works well when installed in Freshdesk, but the problem arises when it is installed in FreshCRM or Freshservice. It neither sends the webhook nor adds logs.
I have attached my manifest.json
and server.js
files below for reference. Please let me know if I am missing something or need to make adjustments.
server.js
const axios = require("axios");
exports = {
webhookHandler: async function (args) {
console.log(args.event, "WEBHOOK RECEIVED");
const { url } = args.iparams;
console.log('Before sending webhook');
await axios.post(url, args)
console.log('After sending webhook');
}
};
manifest.json
{
"platform-version": "3.0",
"modules": {
"common": {},
"support_ticket": {
"events": {
"onTicketCreate": {
"handler": "webhookHandler"
},
"onConversationCreate": {
"handler": "webhookHandler"
},
"onTicketUpdate": {
"handler": "webhookHandler"
}
}
},
"support_agent": {
"events": {
"onAgentUpdate": {
"handler": "webhookHandler"
},
"onAgentCreate": {
"handler": "webhookHandler"
}
}
},
"service_ticket": {
"event": {
"onTicketCreate": {
"handler": "webhookHandler"
},
"onTicketUpdate": {
"handler": "webhookHandler"
},
"onConversationCreate": {
"handler": "webhookHandler"
}
}
},
"chat_conversation": {
"event": {
"onAgentCustomStatusUpdate": {
"handler": "webhookHandler"
},
"onConversationCreate": {
"handler": "webhookHandler"
},
"onConversationUpdate": {
"handler": "webhookHandler"
}
}
}
},
"engines": {
"node": "18.20.4",
"fdk": "9.2.1"
},
"dependencies": {
"axios": "0.27.2"
}
}