Setting Webhook

Webhook is a feature used to link multiple web services.
With Webhook configured in kintone, you can notify external web services when the following actions are performed:

  • Add records
  • Edit records
  • Deleting records
  • Posting Comments
  • Updating a record status

You can use Webhook to link kintone to external web services.
For example, you can link the services to allow Slack to post a message every time a record is added to an app. Image To use Webhook, web services to be linked with kintone must be able to receive data from Webhook. For some web services that are not able to receive data from Webhook, you can use integration web services such as Zapier, Microsoft Power Automate, and IFTTT to enable a link with kintone.

In cybozu developer network, you can find examples of linkage established by Webhook.
No hassle without having to code! Notification to Gmail with Kintone Webhook (cybozu developer network)

Content of Notifications to Be Sent

When Webhook is enabled, kintone sends notifications in the JSON format.

Adding Records/Editing Records/Updating Record Status

The following is the list of parameters for notifications that are sent when records are added or edited, or when the status is changed:

Parameter Value type Description
id Text Indicates a unique ID that is assigned for each notification.
type Text Indicates the type of action.
Record added: ADD_RECORD
Record edited: UPDATE_RECORD
Record status changed: UPDATE_STATUS
app Array Indicates an array that expresses app information.
app[].id Text Indicates an app ID.
app[].name Text Indicates an app name.
record Array Indicates an array that expresses record information.
The array format is the same as the one for REST API that is used in retrieving records.
Retrieving Records (GET) (cybozu developer network)
recordTitle Text Indicates a record title.
The title field can be changed.
Setting the Record Title
url Text Indicates a record permalink.

Example of a Notification to Be Sent

{
"id":"01234567-0123-0123-0123-0123456789ab",
"type":"ADD_RECORD",
"app":{
"id":"1",
"name":"Project management"
},
"record":{
"Record number":{
"type":"RECORD_NUMBER",
"value":"2"
},
...(omitted)...
"$revision":{
"type":"__REVISION__",
"value":"3"
},
"$id":{
"type":"__ID__",
"value":"2"
}
},
"recordTitle":"Visit: Cybozu, Inc.",
"url":"https://example.cybozu.com/k/1/show#record=2"
}

Deleting records

The following is the list of parameters for notifications that are sent when records are deleted:

Parameter Value type Description
id Text Indicates a unique ID that is assigned for each notification.
type Text Indicates the type of action.
Record deleted: DELETE_RECORD
app Array Indicates an array that expresses app information.
app[].id Text Indicates an app ID.
app[].name Text Indicates an app name.
recordId Text Indicates a record number.
deletedBy Array Indicates an array that expresses information of a user who deleted the record.
deletedBy[].code Text Indicates a user login name.
deletedBy[].name Text Indicates a user name.
deletedAt Text Indicates deleted date and time

Example of a Notification to Be Sent

{
"app":{
"id":"1",
"name":"Project management"
},
"id":"01234567-0123-0123-0123-0123456789ab",
"recordId":"2",
"deletedBy":{
"code":"jones",
"name":"John Jones"
},
"deletedAt":"2017-07-03T09:38:09Z"
"type":"DELETE_RECORD"
}

Posting Comments

The following is the list of parameters for notifications that are sent when records are posted:

Parameter Value type Description
app Array Indicates an array that expresses app information.
app[].id Text Indicates an app ID.
app[].name Text Indicates an app name.
comment Array Indicates an array that expresses comment information
The array format is the same as the one for REST API that is used in retrieving records.
Retrieving Record Comments in Bulk (cybozu developer network)
id Text Indicates a unique ID that is assigned for each notification.
recordId Text Indicates a record number.
type Text Indicates the type of action.
Comment posted: ADD_RECORD_COMMENT
url Text Indicates a comment permalink.

Example of a Notification to Be Sent

{
"app":{
"id":"1",
"name":"Project management"
},
"comment":{
"createdAt":"2012-02-03T09:38:09Z",
"creator":{
"code":"smith",
"name":"Mary Smith"
},
"id":"11",
"mentions":[{
"code":"smith",
"type":"USER"
},{
"code":"org1",
"type":"ORGANIZATION"
},{
"code":"group1",
"type":"GROUP"
}],
"text":"I visited Cybozu, Inc. "
},
"id":"01234567-0123-0123-0123-0123456789ab",
"recordId":"2",
"type":"ADD_RECORD_COMMENT",
"url":"https://example.cybozu.com/k/1/show#record=2&comment=11"
}

Webhook Setting Procedure

This section explains how to set Webhook. A maximum of 10 Webhooks can be set.

  1. In the web service to be connected with kintone, retrieve the Webhook Endpoint URL.
  2. Open the app settings page.
    Opening App Settings Page
  3. Click the "App Settings" tab.
  4. Under "Customization and Integration", click "Webhooks". Image
  5. Click Image.
  6. Enter each item. Image

    • Description
      Enter the description text of up to 64 characters for the Webhook to be set. The entered description is displayed on the Webhook setting list screen.
    • Webhook Endpoint
      Enter the Webhook Endpoint URL you retrieved in the web service to be connected with kintone. The entry can be up to 1,024 characters in length.
    • Events
      Specify an action for sending the Webhook notification.
    • Activation
      Select whether to enable the Webhook that was set. By default, this is enabled.

  7. Click "Save".

  8. Click Back to App Settings button on the bottom right side of the screen.

  9. Click "Update App" on the upper right side of the screen.