Creating Webhooks
  • 10 Dec 2024
  • 1 Minute to read
  • Dark
    Light

Creating Webhooks

  • Dark
    Light

Article summary

Overview

Webhooks give developers the option to implement custom logic that can communicate with other web applications in two ways:

  • Outbound: An event happens externally, such as on Facebook Messenger (e.g. message arrived) > Webhook > Run Decisions Flow.
  • Inbound: An event happens in Decisions (e.g. assignment complete) > Webhook > External HTTP request.

Webhooks are unlike API calls in the manner that API calls are request-based output mechanisms while Webhooks are event-based.


Example

  1. Navigate to System > Integrations > Webhooks.

    There are a few webhooks that have been pre-loaded for users and trigger automatically when the proper event happens.

    • Assignment Created
    • Assignment Complete
  2. Select CREATE WEBHOOK.
  3. Provide a Name, then click ADD NEW to add Data Definitions. 
    1. Add an Int32 Type with the Name "Count", a DateTime Type called "Date", and a String Type called "Name". 
      These Definitions will act as the Inputs for the Webhook step within the Flow Designer. 
    2. Click SAVE.

  4. After creating the Webhook, right-click the Webhook and open the Action menu; select View Request Data.

    The View Request data window shows the Data Definitions that were created while creating the Webhook in addition to the Event Name and the Date it was created on.


Create Webhook Action

Webhook Actions are entities that define what the Webhook will do. The following tutorial demonstrates how to establish a Webhook Action.

The URL for this example was generated using a Webhook test site.
  1. From System > Integrations > WebHook, right-click the WebHook to open the Action menu, then select Create WebHook Action.
  2.  Define the Webhook Action by providing a Name and URL.
  3. Select a Request Type via the dropdown menu. 
    For this example, leave the Request Type set to Post.

    Note: Content-Type for POST is application/JSON format.
  4. Provide any Headers or Additional Data by clicking ADD NEW under each section.
  5. Click SAVE.
  6. Back in the WebHook Folder, right-click the WebHook Action, then select Test

    If desired, users may also Edit or Delete the WebHook Action, or View its Request Data. 

  7. Navigate to the Webhook Test Site and view the updated resulting request details.


Run Webhook by Flow Step 

Webhooks are registered as Flow steps under Integration > Webhooks to allow them to be triggered in a Flow. See that the Data Definitions defined earlier are available on this step. 




Integration Activity

Outbound Webhook activity can be viewed on the Integration Activities Report found under System > Administration > System Tools > Flow Management.


Expose Flow as a Webhook

Flows can be exposed as Webhooks. Select Configure in the Flow Designer to see the information on how a Flow can be triggered. 


For this example, Postman was used to trigger the Webhook.




Was this article helpful?