Setting Webhook

By using Webhook in Kintone, a certain action you performed in the Kintone app can be sent to a specified external service .
For example, you can set up integrations without writing a program, such as posting the contents of newly added record to a chat service.

How Webhook Works

By specifying a tool that help you integrate Webhook with different services as a target service, you can link Kintone with various kinds of services that the tool supports.
As a tool that supports the integration, you can use Zapier, Microsoft Power Automate, and IFTTT and so on.

Image

Once Webhook is configured, a notification is sent when the following actions are performed in the Kintone apps.

  • Add records
  • Edit records
  • Deleting records
  • Posting Comments
  • Updating process management statuses

Example

In this section, we use Zapier to show you an example of "sending a notification to Gmail when a new record is added to Kintone".

Preparations

Before configuring a Webhook integration, you need to do the following for preparation:

  • Create a Gmail account
  • Create an app in Kintone

When the preparation is complete, perform the following configurations.

Configure a Trigger in Zapier

  1. Access the Zapier website to sign up.
    If you do not have a Zapier account, create a new one or sign up with a supported account such as Google account.

  2. Click MAKE A ZAP on the Zapier website.

  3. Enter a name in the "Name your zap".

  4. On the screen to choose a trigger, enter "Webhook" in the search box and click "Webhooks by Zapier".

  5. Select "Catch Hook" in the Trigger Event, and click CONTINUE.

  6. After a Custom Webhook URL is created, click Copy.
    Copy the URL and paste it somewhere like a text editor.

Configuring a Webhook in Kintone

  1. Open the Webhook setting page in Kintone.
    Click the app setting button Setting button on the upper right of the record view, select "App Settings" tab > "Customization and Integration", and then select Webhooks.

  2. Click the add button Image.

  3. Enter the description of Webhook to configure.
    The description you enter here will be displayed in the list of Webhook settings. You can enter up to 64 characters. Image

  4. Paste the URL you have copied in Step 6 to the Webhook Endpoint.
    You can enter up to 1,024 characters in the URL field.

  5. In the Events, specify an action for sending the Webhook notification.
    In this example, select "Record is added".

  6. Select whether to enable the Webhook that was set. By default, this is enabled.

  7. Click "Save".

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

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

  10. To test the trigger configured in Zapier, add a new record in the Kintone app.

  11. Return to the Zapier website, click CONTINUE, and click Test trigger.

  12. After you confirmed that the test completed successfully, click CONTINUE.
    If the test failed, try Test trigger several times.
    If the test still fails, check if the URL you copied and pasted in the Webhook Endpoint is correct.

Configure an Action in Zapier

  1. In Zapier, select Gmail on the action setting page.

  2. Select "Send Email" in the Action Event and click CONTINUE.

  3. Select a Gmail account and click CONTINUE.
    If you haven't logged in to Gmail, a screen to confirm your login permission appears.

  4. Configure what kind of information you want to send to Gmail. Enter a Gmail address of the recipient in "To", and configure other necessary information including subject and body.
    After you complete the setting, click CONTINUE.

  5. After you confirmed the setting you made, click TEST & CONTINUE.

  6. Check if the notification e-mail is sent to the recipient's Gmail, and click TURN ON ZAP.

  7. Enable the Zap you configured by turning it on.

What to Be Sent in Notifications

When Webhook is enabled, Kintone sends notifications in the JSON format.
The following tables list the parameters of notifications for each action performed.

Adding Records/Editing Records/Updating Record Status
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"
}
Delete records
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. It does not contain app codes.
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
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. It does not contain app codes.
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"
}