Create webhook

Learn how to create a webhook in NocoDB.

Accessing webhook page

  1. Click on table for which webhook needs to be configured on the left sidebar
  2. Open Details tab in topbar,
  3. Click on Webhooks tab
  4. Click Add New Webhook

Accessing webhook

Configuring webhook

Configuring webhook

  1. Name the webhook - Give a clear & descriptive name.

  2. Select the Trigger Source type :

    • Record - Triggers when a record is inserted, updated, or deleted, or for all actions if “Send me everything” is selected.
    • Manual Trigger / Button Trigger - Trigger runs when a user manually clicks a webhook configured button.
  3. Select Trigger Event type : Refer table here for available events for each source

  4. [Optional] Trigger based on condition : details here

    Conditions are not applicable for Manual Trigger webhook

    • Specify the condition for which webhook should be triggered
    • You can select multiple conditions
    • If no condition is selected, webhook will be triggered for all records
  5. [Optional] Trigger for updates in specific fields : details here

    This is only applicable for After Update event.

    • Select the fields for which webhook should be triggered.
    • If no field is selected, any field update will trigger webhook
  6. Method & URL : Specify the endpoint that the webhook will call when triggered. You can choose from the following HTTP methods: GET, POST, PUT, DELETE, PATCH, and HEAD.

  7. [Optional] Headers & Parameters : Configure Request headers & parameters

  8. [Optional] Body : Configure request body. You can use handlebar syntax to access and manipulate the data easily. For example, {{ json event }} will give you the complete event data (default behaviour if body not configured).

  9. [Optional] Click Test webhook button to verify if parameter are configured appropriately (with sample payload)

  10. Click Create Webhook button to complete webhook creation

Trigger Source and Event

Webhooks in NocoDB can be configured based on the source of the trigger and the type of event. The table below outlines the available combinations:

Trigger SourceTrigger EventDescription
RecordSend Me EverythingTriggers on any record insert, update, or delete operation
After InsertTriggers after one or more records are inserted
After UpdateTriggers after one or more records are updated
After DeleteTriggers after one or more records are deleted
Button TriggerTriggers when a button field is clicked

For more details on using Button Trigger webhooks with the Button field, see the Button field documentation.

Webhook with conditions

Webhooks in NocoDB can be configured to trigger only when specific conditions are met. For example, you may choose to trigger a webhook only when the Status field is set to Complete. You can define multiple conditions using logical operators like AND or OR—such as triggering the webhook on record update only when Status is Complete and Priority is High.

Webhook with conditions

A webhook will only be triggered if the condition transitions from not met to met during a record event. For instance (for above example), if the original record has Status = Complete and Priority = Low, and you update it to Priority = High, the webhook will trigger—since the condition was not met before but is met after the update. However, if a record already satisfies the condition (Status = Complete and Priority = High) and you update unrelated fields, the webhook will not be triggered.

In short, a webhook is triggered only when the condition changes from false (old record) to true (new record).

Note: Conditions are not applicable for Manual Trigger webhook.

Webhook on field changes ☁

Note: This feature is only available in the paid plans, in both cloud & self-hosted.

For After Update event, you can configure webhook to trigger only when certain fields are updated. For example, trigger webhook only when Status is updated. You can also configure multiple fields.

Webhook on field changes

Webhook response sample

{
  "type": "records.after.insert",
  "id": "c245c528-8759-4e10-b7d5-e2626dd7c321",
  "version": "v3",
  "data": {
    "table_id": "mbmppjnstflsqq1",
    "table_name": "Features",
    "rows": [
      {
        "Id": 4,
        "CreatedAt": "2025-05-07 17:18:37+00:00",
        "UpdatedAt": null,
        "Title": "Task-2",
        "Status": "Ongoing",
        "Priority": "Low"
      }
    ]
  }
}
{
  "type": "records.after.update",
  "id": "f5e6a827-fb37-4a04-8cd9-be7831f9d897",
  "version": "v3",
  "data": {
    "table_id": "mbmppjnstflsqq1",
    "table_name": "Features",
    "previous_rows": [
      {
        "Id": 3,
        "CreatedAt": "2025-05-07 17:18:33+00:00",
        "UpdatedAt": null,
        "Title": null,
        "Status": null,
        "Priority": null
      }
    ],
    "rows": [
      {
        "Id": 3,
        "CreatedAt": "2025-05-07 17:18:33+00:00",
        "UpdatedAt": "2025-05-07 17:18:37+00:00",
        "Title": "Task-1",
        "Status": "Complete",
        "Priority": "High"
      }
    ]
  }
}
{
  "type": "records.after.delete",
  "id": "4cad2ff8-9ee6-4889-8c85-9969361a1df0",
  "version": "v3",
  "data": {
    "table_id": "mbmppjnstflsqq1",
    "table_name": "Features",
    "rows": [
      {
        "Title": "Task-2",
        "Id": 2,
        "Status": "Ongoing",
        "Priority": "Low"
      },
      {
        "Title": "Task-1",
        "Id": 3,
        "Status": "Complete",
        "Priority": "High"
      }
    ]
  }
}
{
  "type": "records.manual.trigger",
  "id": "551a2010-d658-4185-a050-cf3fca56a5a9",
  "version": "v3",  
  "data": {
    "table_id": "mzo4r3zrbcph43i",
    "table_name": "Features",
    "rows": [
      {
        "Id": 1,
        "Title": "dstala",
        "CreatedAt": "2024-08-12 11:56:15+00:00",
        "UpdatedAt": "2024-08-12 11:56:48+00:00",
        "Button": {
          "type": "url",
          "label": "Button",
          "url": "https://github.com/dstala"
        },
      }
    ]
  }
}

Webhook with custom payload ☁

This feature is only available in the paid plans, in both cloud & self-hosted.

In the enterprise edition, you can set up a personalized payload for your webhook. Just head to the Body tab to make the necessary configurations. Users can utilize handlebar syntax, which allows you to access and manipulate the data easily.

Use {{ json event }} to access the event data. Sample response is as follows

{
  "type": "records.after.insert",
  "id": "0698517a-d83a-4e72-bf7a-75f46b704ad1",
  "version": "v3",
  "data": {
    "table_id": "m969t01blwprpef",
    "table_name": "Table-2",
    "view_id": "vwib3bvfxdqgymun",
    "view_name": "Table-2",
    "rows": [
      {
        "Id": 1,
        "Tags": "Sample Text",
        "CreatedAt": "2024-04-11T10:40:20.998Z",
        "UpdatedAt": "2024-04-11T10:40:20.998Z"
      }
    ]
  }
}

Discord Webhook

Discord webhook can be configured to send messages to a Discord channel. Discord request body should contain content, embeds or attachments, otherwise request will fail. Below is an example of Discord webhook payload. More details can be found here

{
  "content": "Hello, this is a webhook message",
  "embeds": [
    {
      "title": "Webhook",
      "description": "This is a webhook message",
      "color": 16711680
    }
  ]
}

To send complete event data to Discord, use below payload

{
  "content" : {{ json ( json event ) }}
}

One can also customize the payload as per the requirement. For example, to send only the Title field to Discord, use below payload. Note that, the value of content is what that will get displayed in the Discord channel.

{
   "content": "{{ event.data.rows.[0].Title }}"
}

Environment Variables

In self-hosted version, you can configure the following environment variables to customize the webhook behavior.

  • NC_ALLOW_LOCAL_HOOKS: Allow localhost based links to be triggered. Default: false

Find more about environment variables here