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.
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.
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 | Object | The object that provides app information. |
app.id | Text | Indicates an app ID. |
app.name | Text | Indicates an app name. |
record | Object | The object that provides record information. The format is the same as the one for REST API that is used for 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.kintone.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 | Object | The object that provides app information. |
app.id | Text | Indicates an app ID. |
app.name | Text | Indicates an app name. |
recordId | Text | Indicates a record number. |
deletedBy | Object | The object that provides information on 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":"sato",
"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 | Object | The object that provides app information. |
app.id | Text | Indicates an app ID. |
app.name | Text | Indicates an app name. |
comment | Object | The object that provides information on comments. The format is the same as the one for REST API that is used for 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":"kato",
"name":"Mary Smith" },
"id":"11",
"mentions":[{
"code":"kato",
"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.kintone.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.
-
In the web service to be connected with Kintone, retrieve the Webhook Endpoint URL.
-
Open the app settings page.
Opening App Settings Page -
Click the "App Settings" tab.
-
Under "Customization and Integration", click "Webhooks".
-
Click
.
-
Enter each item.
- 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 URL
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.
- Description
-
Click "Save".
-
Click Back to App Settings button on the bottom right side of the screen.
-
Click "Update App" on the upper right side of the screen.