Articles in this section

Create a webhook listener

Create a webhook listener when you want a flow to start the moment an event happens in another application, such as a new order in your storefront. You add the listener as the source step of a flow, generate a public URL, secure it, and then register that URL in the source application. This article covers the full setup and a test to confirm that data arrives.

Prerequisites:

  • Confirm that your source application can send webhooks (HTTP POST or PUT requests) and find where it lets you enter a destination URL.
  • Get sample data for the event you want to receive. Your source application's API documentation often includes example payloads.
  • If you plan to secure the listener with HMAC, a token, or basic authentication, get the required credentials or secret from the source application.
  • You're an account owner or administrator, or you have Manage access to the integration that holds the flow. See Manage user roles & permissions to an account.

Add the listener to a flow

  1. At the top of the page, in Environment, select the environment where you want to build the flow.
  2. Go to Build build-icon.png, and then select Flows.
  3. In the flow builder, select Add source.
  4. In Create source, for Application, select a webhook application. Select Webhook for a universal webhook connection, or select an application that supports webhooks.
  5. For Step type, select Listen for real-time data from source application.
  6. Enter a unique, descriptive name for the step.
  7. Select Next. The listener settings open.

Note: If you selected a webhook-supported application, choose the Webhook view to see all the settings in this article. The Simple view shows only the fields specific to that application.

Generate the public URL

The public URL is the address your source application sends webhook requests to.

  1. In Generate URL & sample data, next to Public URL, select the plus icon (+) to generate a URL.
  2. Copy the URL. You'll enter it in your source application later in this article.

Secure the listener

  1. In Secure the listener, for Verification type, select Basic, HMAC, Secret URL, or Token.
  2. Complete the fields for the method you selected.

For help choosing a method and for the fields each method requires, see Secure a webhook listener. To also control which IP addresses can reach the webhook listener, assign a network policy in the Advanced section. See Assign a network policy.

Add sample data

Sample data lets you build mappings and filters in later flow steps before any live requests arrive.

  1. In Sample data, paste an example payload in JSON format.
  2. Optional: In Sample headers, enter example request headers as an array of name-value objects in canonical JSON format.
  3. Optional: In Sample query parameters, enter example query parameters in the same format.

Tip: Sample data must be JSON, even if your source application sends XML. To convert an XML payload, go to Build build-icon.png, and then select Playground. Use the XML parser helper to convert it.

For the canonical JSON format, see The Celigo platform's canonical format for mock data.

Configure optional settings

Configure these settings only if your use case needs them:

  • For challenge and success responses: If your source application sends a verification challenge or expects a specific response, see Customize webhook listener responses.
  • For nested records: If the payload wraps records in an object, such as an order with an array of line items, see Process nested records in a webhook payload.
  • For IP restrictions: To accept requests only from specific IP addresses, assign a network policy in Advanced. See Assign a network policy.
  • For advanced settings: To change page size, add links to source records, or control retry data, see Webhook listener settings reference.

Save the listener

  1. Select Save, and then select Close. Close doesn't save your changes.

Register the URL in your source application

  1. Sign in to your source application and open its webhook settings.
  2. Create a webhook for the event you want to receive.
  3. Enter the public URL you copied from the listener as the destination URL.
  4. If you secured the listener, enter the matching credentials, secret, or token in the source application.
  5. Save the webhook in the source application.

Test the listener

  1. Turn on the flow.
  2. In the source application, perform the action that triggers the webhook, such as creating a test order.
  3. Confirm that the flow runs and that the data arrives as expected.

To see the exact requests the listener receives, see Debug a webhook.

Create a listener outside a flow

You can also create a listener as a standalone export and add it to a flow later.

  1. At the top of the page, in Environment, select the environment where you want the listener.
  2. Go to Resources resources-icon.png, and then select Exports.
  3. Select Create export, and then select a webhook application. For a webhook-supported application, select the Webhook option.
  4. Complete the required settings described in this article.