Return value from serverless app webhook?

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}

@stevemc,
unfortunately, it is not possible to return a value from onExternalEventHandler

Kindly refer to this thread for your reference. :point_down:

Thanks

@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?

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.