Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

Using Webhooks with Conga Composer

Webhooks serve as a connection between external applications and Conga's Composer API and Document Merge UI. This functionality allows various business applications, including Dynamics and HubSpot, to initiate the Document Merge UI and supply necessary data. Administrators have the ability to configure webhooks through Advantage Platform navigation. Additionally, webhooks and JSON payloads act as data sources for document generation, expanding their utility beyond Salesforce.

Getting Started with Webhooks

Required software/ access:

API:

  • Access to Postman.

  • Your Client Id and Secret generated from your account in Conga to generate a token within Postman.

UI:

  • A valid Conga org with a Composer license, Document Merge and Conga's new UI flags enabled.

Securing Webhook Endpoint with Basic Authentication

This guide explains how to secure your webhook endpoint when integrating with Conga for Advantage Platform.

Your webhook endpoint must validate Basic Authentication to ensure that requests are authenticated and tamper-proof. When Conga triggers your webhook, it will send requests to the endpoint you configure.

Your implementation must:

  1. Validate Basic Authentication credentials

  2. Accept requests in the required structure

  3. Return responses in the required structure

Authentication and Security Requirements

Basic Authentication

Your endpoint must accept an Authorization header in the following format: Authorization: Basic <base64(username:password)>

The username and password should be configured in your appsettings.json file under WebhookSettings.BasicAuth.

Example appsettings.json
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"WebhookSettings": {
"HmacSecretKey": "your-hmac-key",
"BasicAuth": {
"Username": "your-username (ClientId)",
"Password": "your-password (ClientSecret)"
}
}
}
  • Username: The Client ID you received from Conga when creating your webhook.

  • Password: The Client Secret you received from Conga when creating your webhook.

Note: These are the same credentials you provided in the webhook creation request payload. They must also be used by your webhook for validating incoming requests.

Endpoints

Get a List of Webhooks:

GET /api/webhooks/v1

Purpose: Returns a list of all webooks for an authenticated org.

Response includes:
webhookId, name, events, status, createdAt

Get a Single webhook:

GET /api/webhooks/v1/{webhookId}

Purpose: returns the details of a specific Webhook, indicated by its ID value.

Returns: 404 error message if the webhook is not found in the authenticated org.

Update a Webhook:

PATCH /api/webhooks/v1/{webhookId}

Purpose: Updates the specified webhook values. Values that can be updated are
url, events, authentication, name
{
"isSuccess": true,
"statusCode": 200,
"message": "Webhook updated successfully.",
"data": {
"id": "d8d30cb0-5675-4bd2-8ae3-b49f96d899c9",
"name": "WebhookUpdate",
"url": "https://8h0tskxn-7078.inc1.devtunnels.ms/api/event/webhook1",
}
}

Returns: Upon success, the updated webhook will be returned, or 404 error message if not found in the org.

Delete a Webhook

DELETE /api/webhooks/v1/{webhookId}

Purpose: Removes the specified webhook.

Returns: 204 on a success, 404 if not found. Subsequent delete attempts on the same ID will result in 404 errors.

Example Format for the above Endpoints:
{
"name": "WebhookName",
"endpointpath": "https://webhook.site/54321",
"requestBody":
"event": "DataRequest",
"datasetId": "12345",
"timestamp": "2025-09-17T14:15:22.123Z"
}

Retrieving Customer Data -

GET /customer

Purpose: Retrieve specified customer data

Requirements:

  • Validate Basic Auth

Example Response
[
{
"date": "2025-09-17T14:15:22.123Z",
"json": "{ \"id\": 1, \"name\": \"Customer 1\" }"
}
]

POST /customer

Purpose: Process customer data

Requirements:

  • Validate Basic Auth

  • Accept request body in the required CustomerRequest structure

Request Body Model:
public class CustomerRequest
{
public string Event { get; set; } = string.Empty;
public string DatasetId { get; set; } = string.Empty;
public string Timestamp { get; set; } = string.Empty;
}
Example Request Body:
{
"event": "DataRequest",
"datasetId": "12345",
"timestamp": "2025-09-17T14:15:22.123Z"
}
Response Model:
public class CustomerData
{
public string Date { get; set; } = string.Empty;
public string Json { get; set; }
}
Example Response:
[
{
"date": "2025-09-17T14:15:22.123Z",
"json": "{ \"id\": 1, \"name\": \"Customer 1\", \"city\": \"City1\" }"
}
]
You can return any JSON payload inside the JSON field as per their own use case.

Using Webhooks with Composer API

Below is an example of leveraging a webhook via Composer API request, using Postman.
  1. Import your JSON file into postman.
  2. Select your imported file and go to Authorization.
  3. Click the Get New Access Token to generate the Usertrust token.
  4. This will prompt the Conga for Advantage Platform login screen, select your IDP and input your login credentials.
  5. Logging in will prompt the notification to open Postman in browser. Click Open.
  6. The screen will display Authenticated.
  7. Open the Postman program. Click the Use Token Button to add it in the collection.
  8. After completing authentication, click on IngressIbis Merge request. HIT POST endpoint: {{BASE_URL}}/api/ingress/v1/Merge?MergeEngine=PlatformComposer
    1. Payload:
      {
          "legacyOptions": {
              "SelectAttachments": "1",
              "DS7": "1",
              "DS7Preview": "1"
          },
          "templateSources": [
              {
                  "integrationName": "conga",
                  "fileId": "7097aeff-30f7-403c-9992-a967b2812b64"
              }
          ],
          "dataSources": [
              {
                  "type": "Webhook",
                  "dataSourceId": "3ab858b3-763f-441b-9825-cbd3b8e9f992"
              }
          ]
      }
    2. Output
      {
          "correlationId": "2cfe5f9d3bbc4fbe87265779f872cd44_DatasetJson",
          "status": "Accepted",
          "result": {
              "statusCode": "Success",
              "statusMessage": [
                  {
                      "code": "SUCC200",
                      "description": "Success"
                  }
              ]
          }
      }

You will receive a Correlation ID. For example, Correlation ID: 2cfe5f9d3bbc4fbe87265779f872cd44_DatasetJson

With the correlation ID, you can see preview and merge status. Hit GET API: GET: {{BASE_URL}}/api/ingress/v1/status/{{CORRELATION_ID}}?showDetails=true

To check preview, click Preview URL API with the correlation Id, which displays mergedFileUri-merged file type. GET: {{BASE_URL}}/api/ingress/v1/Merge/Preview/{{CORRELATION_ID}}?showDetails=true

You can use the Ctrl+Click keyboard shortcut on previewFileUri it will download the file to your local machine. You can Ctrl+Click on mergedFileUri to download the merged file.

Using Webhook APIs from Postman

You can utilize the Webhook API in order to create the webhook. Below is a list of the Webhook APIs you can use.
  1. Import your JSON file into Postman.
  2. Generate Dev Token in Collection by hitting auth API. POST: {{BASE_URL}}/api/v1/auth/connect/token
  3. Click Create Webhook API to create a new webhook. POST: {{BASE_URL}}/api/webhook/v1/Webhook
  4. Click Get Webhook Details API to see details of the webhook. GET: {{BASE_URL}}/api/webhook/v1/Webhook/{{WEBHOOK_ID}}
  5. Click Get Auth details for Webhook Client ID and Secret. GET: {{BASE_URL}}/api/secret-management/v1/secret/{{AUTH_SECRET_ID}}
  6. To update fields, click Patch API. PATCH: {{BASE_URL}}/api/webhook/v1/Webhook/{{WEBHOOK_ID}}
  7. Click Get All Webhooks API to list all available webhooks. GET: {{BASE_URL}}/api/webhook/v1/Webhook
  8. Select Delete API to delete the webhook. DELETE: {{BASE_URL}}/api/webhook/v1/Webhook/{{WEBHOOK_ID}}

Pass Data to Document Merge UI using Webhook

Steps to use webhook to pass JSON data through Composer's Document Merge UI to generate data for Composer for Advantage Platform templates.

Step 1: Acquire a Webhook URL

  1. Enter the endpoint of a third-party CRM, for example Webhook.site.

  2. Click the Edit button.

  3. Change "Content type" to application/json.

  4. In Content, paste in your JSON values and click Save.

  5. Your unique webhook URL will generate.

  6. Copy this value and pasty this to a text document.

Step 2: Create Webhook value in Platform

  1. Navigate to Conga Advantage Platform.

  2. In the Apps list, go to Automation > Webhooks.

  3. Click the + New button to create a new webhook listing.

  4. Click into the New Webhook name to edit the name.

  5. Select Post/GET as the method.

  6. Click into the "Enter the URL to get started" field and copy and paste the webhook URL from the end of step 1.

  7. Click the Authentication tab and input your Client ID and Secret values.
    Note: You can store up to 100 secret keys per Conga Platform org. This includes webhooks, Composer API client IDs and secrets and other Composer Platform IDs and secrets.
  8. Under the Headers tab, input the Key and Values fields. Click the small green checkmark when you are done to add it to the list of Headers.

  9. Click Save.

Step 3: Merge with the Document

  1. On the Webhook Management page, copy the Webhook ID of your desired webhook by clicking the copy button.

  2. Navigate to Document Merge > Document Selection.

  3. In your browser URL, ensure the type is equal to Webhook, and paste the Webhook ID in the dataSourceID. Example: congacloud.io/app/merge?type=Webhook&dataSourceid=ccda0cb6-b7f4-aac7-e9odd4335ese7a

Now select one of your existing templates and click Generate & Preview.