stevemc
(Steve McMillen)
March 4, 2022, 6:04am
#1
Is it possible to return a value from a freshworks serverless app webhook?
I’m running a Microsoft flow. I’d like to insert a record in CRM from that. But I’d also like to return the ID of the record in order to allow me to then update it on subsequent steps in flow.
Is it possible to return a value from a webhook?
Below sample simplified:
exports = {
onExternalEventHandler: function (args) {
if(args.data.event=='new_custom_deal_term') {
return createTerms(args).catch(console.error)
} else if(args.data.event=='update_custom_deal_term') {
updateTerms(args).catch(console.error)
}
},
...
}
async function createTerms(args) {
return (await someFunction(args))
}
But I don’t think I can put an await inside the onExternalEventHandler.
I tried calling the web hook and all I get back is {success: true}
Santhosh
(Santhosh Balusamy)
March 4, 2022, 10:27am
#3
@stevemc ,
unfortunately, it is not possible to return a value from onExternalEventHandler
Kindly refer to this thread for your reference.
Thanks a lot @Raviraj for the immediate response and the linked thread, which pretty much spelled out the various trials I have done. I would respond to Saif with the details of my business case as this is very limiting.
Thanks
Saif
(Saif Ali Shaik)
March 5, 2022, 3:20am
#4
@stevemc This has been in discussions for a long time to us right now.
If you don’t mind, can you upvote and add your thoughts to this thread?
@omarcelo @samuelpares or anyone who is following this thread.
We are looking for some opinions in order to make this feature request a reality.
Problem Statement
As we assessed the topics related to this feature request, we understood following
External Events feature for apps essentially generates a webhook URL that is registered with any 3rd party system. So 3rd party invokes webhook. webhook invokes a handler fn. handler fn executes and timeouts in 20s.
Developers like …
system
(system)
closed
March 11, 2022, 9:21am
#5
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.