How to use

NO IMAGE

 Home > Connect > kintone > How to use

Japanese may be displayed on some pages.

Index

Add the Cloud BOT Connector to an app

1. Select "Plug-ins" from the App Settings screen.

2.  Click "Add Plug-in", select the check box next to the Cloud BOT Connector, then click the "Add" button.

Plug-in settings

Connection settings

In order to use the Cloud BOT Connector, Cloud BOT account connection must be configured.

1. Click the cog mark (settings) for the Cloud BOT Connector.

2. Generate and paste the API token to the "API token" field on the setting. 
>> Click here about how to generate the API token

3. Click the "Authorize" button.

4.Log in to Cloud BOT with an account to connect.

If you have already logged in to Cloud BOT, the account will be connected.

When the status changes from "Not authorized" to "Authorized", the process is complete.

Run settings

Configure the BOT’s run settings.
* You can set the run settings for multiple BOTs. Click "+ Add bot settings" to add the settings.

BOT to execute

Select the BOT to execute. 
*It is necessary to publish the API of the target BOT on the Cloud BOT service.

Execution status storage destination

Select the destination to store the BOT’s execution status. You can see the execution status on the record screen.
You can select only a string (single line) field.
>>Refer to this page about status.
* If this item is not selected, you cannot see the BOT’s execution status (However you can run the BOT).

実行結果の格納先

BOTの実行結果と、kintoneアプリのレコードにデータを格納したログを指定したフィールドに出力します。
選択できるフィールドは文字列(複数行)フィールドのみです
>>実行結果の出力フォーマットに関してはこちら
※未選択の場合は、ログは出力されません。

Execution timing

Select the timing to run the BOT.

- "Execute" button
The "Execute" button is placed on the record screen, and BOT is executed by clicking it.

- Webhook
Execute BOT under certain conditions.

Following conditions are available:

  • When a record is added
  • When a record is edited
  • When a record is deleted
  • When a comment is posted
  • When a status is updated*

* You need to enable [process management] in the app settings.

Webhook registration is required to set these conditions.
>> Refer to this page about registering a webhook.

Option

You can set the following options.

- Check input values before execution
After clicking the [Execute] button, you will be prompted to confirm the input values before running the BOT.

- Open BOT browsing screen at runtime
Clicking the "Execute" button opens the BOT browsing screen. (The page will open in a separate window)

- Do not display on detail screen
詳細画面に表示しません。(実行設定の実行タイミングで実行ボタンにチェックがついている場合は、使用できません)

BOT input values settings

Specify the input values assigned to the BOT.

Form values

Specifies the fields of kintone app. 
>> Refer to this page for Cloud BOT’s data types to kintone’s field types mapping

Properties

Specifies the properties of kintone app.

  • Comment
  • Comment contributor(Login name:Display name)
  • Comment contributor(Login name)
  • Comment contributor(Display name)
  • Comment number
  • Status
  • Record id
  • Record number
  • Revision
  • Updated by(Login name:Display name)
  • Updated by(Login name)
  • Updated by(Display name)
  • Updated datetime
  • Assignee(Login name:Display name)
  • Assignee(Login name)
  • Assignee(Display name)
  • Created datetime
  • Execution timing

Others

You can specify other values.

  • Not entered
  • Fixed value

* Input a value directly for “Fixed value”.

BOT output value storage destination setting

BOT出力値をkintoneアプリのレコードに格納したい場合に設定します。
格納先のkintoneアプリのフィールドと、格納するBOT出力値を選択します。

同一レコードに格納する

同一レコードに出力値を格納します。

格納先のフィールド格納する値

格納先のフィールドは任意数設定できます。「+フィールドを追加する」をクリックすることで設定が追加されます。

kintoneアプリのフィールド

格納先のフィールドを指定します。

BOTの出力データ

格納する値を指定します。

出力データ

BOTの出力データを指定できます。
>> クラウドBOTのデータタイプとkintoneのフィールドタイプの対応表はこちら

※「追加レコード数」の項目で「グループデータ行数」を選択している場合、BOTの出力データとして選択できる値はグループデータのみです。

その他

その他の値を指定できます。

  • 固定値
  • ステータス
  • BOT名
  • Job ID

※固定値は値を直接指定します。

指定したアプリのレコードに格納する

指定したアプリのレコードに出力値を格納します。
「+格納先を追加する」をクリックすることで設定が追加されます。

格納先

スペースで絞り込み、アプリを選択します。

追加レコード数

・1レコード
新しいレコードを1つ作成します。

・グループデータ行数
グループデータ行数分のレコードを作成します。

格納先のフィールド格納する値

格納先のフィールドは任意数設定できます。「+フィールドを追加する」をクリックすることで設定が追加されます。

kintoneアプリのフィールド

格納先のフィールドを指定します。

BOTの出力データ

格納する値を指定します。
>> 入力できる項目についてはこちら

格納方法

格納方法では以下の選択肢を指定できます。

  • 新規
  • 更新
  • 新規&更新
格納方法格納先に「1レコード」を選択した場合格納先に「グループデータ行数」を選択した場合
新規新しいレコードを1つ作成します。グループの明細行分、新しいレコードを作成します。
更新全ての更新条件に一致する既存レコードを更新します。グループの明細行分、明細行ごとに全ての更新条件に一致する既存レコードを更新します。
新規&更新全ての更新条件に一致する既存レコードを更新します。
第一更新条件が一致しない場合は新規レコードとして作成します。
グループの明細行分、明細行ごとに全ての更新条件に一致する既存レコードを更新します。
第一更新条件に一致しないグループの明細行は新しいレコードとして作成します。
更新条件

格納方法に「更新」または「新規&更新」を指定している場合のみ表示されます。

第一更新条件を指定します。
第一更新条件には、更新したいレコードを識別できるkintoneアプリのフィールドとキーにするBOTの出力データを指定します。
※更新されるには、指定した全ての更新条件が一致している必要があります。

kintoneアプリのフィールド

更新するレコードを識別できるフィールドを指定します。

  • レコードID
  • 文字列(1行)
  • 数値

※「文字列(1行)」と「数値」フィールドは、重複禁止を設定する必要があります。

演算子

kintoneアプリのフィールドの値とBOTの出力データの値を比較する演算子を指定します。

  • = (等しい)
BOTの出力データ

キーにするBOT出力データを指定します。
>> 入力できる項目についてはこちら
※出力データではBOTのテキストタイプの出力データのみ指定できます。

条件を追加する

「条件を追加する」をクリックすることで条件が追加されます。

kintoneアプリのフィールド

フィルターするフィールドを指定します。

BOTのテキストタイプに対応しているkintoneのフィールドタイプを指定します。
>> クラウドBOTのデータタイプとkintoneのフィールドタイプの対応表はこちら

演算子

kintoneアプリのフィールドの値とBOTの出力データの値をフィルターする演算子を指定します。

  • = (等しい)
  • ≠ (等しくない)
  • ≦ (以下)
  • < (より小さい)
  • ≧ (以上)
  • > (より大きい)
BOTの出力データ

フィルターするBOTの出力データを指定します。
>> 入力できる項目についてはこちら
※出力データではBOTのテキストタイプの出力データのみ指定できます。

Input another API token

If another application is specified as the storage destination, an API token for each application is required.
Specify an API token for each application.
>>Refer to this page this page about generating the API token.

Save / Update plug-in settings

1. After setting, click the "Save" button.

Click the "Update App" button to reflect the settings to the operational environment.

How to run the connected BOT

Execute button

Clicking the "Execute" button executes the BOT any time.

Check input values before execution

By selecting [Check input values before execution] in the options of Execute settings, a confirmation dialog will be displayed before the BOT run.

Open BOT browsing screen at runtime

By selecting [Open BOT browsing screen at runtime] in the run setting option, the preview of the run screen will open in a separate window.

Run with a webhook

The conditions under which the BOT is executed are displayed.

  • added: When a record is added
  • edited: When a record is edited
  • deleted: When a record is deleted
  • commented: When a comment is posted
  • status updated: When a status is updated

Status

The execution status is displayed. Click the report icon next to the status to open the Cloud BOT execution logs screen in a separate window.

The status changes as follows.

Status when the BOT execution starts

Status when the BOT execution

Generate the API token

1. Go to the API token page from the link under the "API token" column in the connection settings.

2. Click the "Generate" button. "View records", "Add records", and "Edit records” access rights are required.

Be careful not to let others know the generated API token.

3. Click "Save" on the top left. The API token settings are saved.

4.Click the "Update App" button to reflect the settings to the operational environment.

Register the webhook

By registering a webhook, you can run the BOT when a specific event occurs.

1. Select "Webhook" on the "Execution settings" in the Cloud BOT Connector settings screen. Webhook URL is displayed.



2.Copy the webhook URL then click the webhook registration page link. 

3.A separate window is open. Click [+] at the top right to add the webhook.

4.A separate window is open. Paste the copied URL in the "Webhook Endpoint" field.

5.Specify all "Events".

6. Finally, select [Activate this webhook] and click the [Save] button to register the webhook.

Supplementary note

Cloud BOT’s data types to kintone’s field types mapping

Cloud BOT’s data type Kintone’s field type 備考

Text

Text -
Text area -
Number -
Calculated -
Rich text -
Drop-down -
Radio button -
Date

BOT出力値の格納先設定では、値を以下の値にしてください。

  • 2020
  • 2020-12
  • 2020-12-12
Data and time

BOT出力値の格納先設定では、値を以下の値にしてください。

  • 2020-01-01T01:00:00Z
  • 2020-12-01T10:00:00+09:00:00
  • 2020-12-01T01:00:00
Link -
Time

BOT出力値の格納先設定では、値を以下の値にしてください。

  • 12:00
Multiple texts Multi-choice -
Check box -
User selection

BOT入力値の設定では、Kintoneアプリのフィールドに以下の選択肢が表示されます。

  • User selection(Login name:Display name)
  • User selection(Login name)
  • User selection(Display name)

BOT出力値の格納先設定では、BOT実行結果から出力された以下の値にしてください。

  • Login name
Department selection

BOT入力値の設定では、Kintoneアプリのフィールドに以下の選択肢が表示されます。

  • Department selection(Department code:Department name)
  • Department selection(Department code)
  • Department selection(Department name)

BOT出力値の格納先設定では、BOT実行結果から出力された以下の値にしてください。

  • Department code
Group selection

BOT入力値の設定では、Kintoneアプリのフィールドに以下の選択肢が表示されます。

  • Group selection(Group code:Group name)
  • Group selection(Group code)
  • Group selection(Group name)

BOT出力値の格納先設定では、BOT実行結果から出力された以下の値にしてください。

  • Group code
Assignee

使用するにはアプリ設定の「プロセス管理」を有効化する必要があります。

File Attachment -
Group Table -

 

実行結果の出力フォーマット

BOT実行結果とkintoneアプリのレコードにデータを格納したログを出力します。
※表示するデータがない項目は表示されません。

BOT実行結果 :
    ステータス : 完了
    コード : 201
    BOT名 : 物件情報
    実行日時 : 2012-12-12 13:00:00
    実行時間 : 15
    メッセージ :
格納先リスト :
    格納先 : 案件管理 グループデータ行数 商品登録
    正常 :
        追加されたレコードのキー :
            - 101
        更新されたレコードのキー :
            - 102
        フィルターされたレコードのキー :
            - 103
    エラー :
        処理に失敗したレコードのキー :
            - 104
    合計 :
        正常件数 : 3
        エラー件数 : 1
    エラーメッセージ : 入力内容が正しくありません。
    エラー詳細 :
        - キー : 104
          行番号 : 3
          内容 :
            メールアドレス :
                - 値の形式が不正です。
            テーブル
                行番号 : 11
                内容 :
                    建物名 :
                        - 値が他のレコードと重複しています。

BOT実行結果

BOTの実行結果を出力します。

・ステータス
実行ステータスを出力します。

・コード
HTTPステータスコードを出力します。

・BOT名
実行したBOT名を出力します。

・実行日時
BOTを実行した日時を出力します。

・実行時間
BOTの実行から終了までの経過時間を出力します。

・メッセージ
BOTの実行が継続中または、BOTの実行が失敗したエラーメッセージを出力します。

格納先リスト

kintoneアプリのレコードにBOTの出力データを格納したログを出力します。

格納先

kintoneアプリのレコードにデータを格納したログを出力します。

正常

・追加されたレコードのキー

追加されたレコードのキーを出力します。

格納方法
新規追加されたレコードのレコードIDを出力します。
更新-
新規&更新第一更新条件で指定したキーの値を出力します。

・更新されたレコードのキー

更新されたレコードのキーを出力します。

BOT出力値の格納先設定備考
同一レコードに格納する同一レコードのレコードIDを出力します。-
指定したアプリのレコードに格納する第一更新条件で指定したキーの値を出力します。格納方法に「更新」または「新規&更新」を指定している場合のみ出力します。

・フィルターされたレコードのキー

「更新条件」に一致せず、格納されなかったレコードのキーを出力します。
※「格納方法」が「新規&更新」で「更新条件」に一致しない場合は、フィルターせず新しいレコードを作成します。

エラー

・処理に失敗したレコードのキー

格納に失敗したレコードのキーを出力します。

BOT出力値の格納先設定備考
同一レコードに格納する同一レコードのレコードIDを出力します。-
指定したアプリのレコードに格納する第一更新条件で指定したキーの値を出力します。格納方法に「更新」または「新規&更新」を指定している場合のみ出力します。

合計

・正常件数

正常件数を出力します。

・エラー件数

エラー件数を出力します。

エラーメッセージ

エラーメッセージを出力します。

エラー詳細

・キー

格納に失敗したレコードのキーを出力します。

BOT出力値の格納先設定備考
同一レコードに格納する同一レコードのレコードIDを出力します。-
指定したアプリのレコードに格納する第一更新条件で指定したキーの値を出力します。格納方法に「更新」または「新規&更新」を指定している場合のみ出力します。

・行番号

グループデータ行数分の格納でエラーになる行番号を出力します。
※BOT出力値の格納先設定「指定したアプリのレコードに格納する」の設定から「追加レコード数」を「グループデータ行数」の設定のみ出力します。

・内容

kintoneアプリのレコードにBOTの出力データを格納しエラーになるフィールド名と原因を出力します。
※エラーになるkintoneアプリのフィールドがテーブル内のフィールドの場合、テーブル名とエラーになる行の番号も出力します

Execution timing restrictions

If the following conditions are met at execution timing, the input value to the kintone app field will be "not specified".

Input valueExecution timingProcess administration settings
All form field valuesAfter deleting a record-
Comment"Execute" button
When a record is added
When a record is edited
When a record is deleted
When a status is updated
-
Posted by"Execute" button
When a record is added
When a record is edited
When a record is deleted
When a status is updated
-
Comment number"Execute" button
When a record is added
When a record is edited
When a record is deleted
When a status is updated
-
Status-Disabled
StatusAfter deleting a record-