by r3-yamauchi · v0.2.0
Provides convenient features for reading/writing kintone records and uploading/downloading attachments
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
Author: r3-yamauchi Version: 0.2.0 Type: tool
English | Japanese
This is an unofficial plugin for interacting with kintone apps. By using this plugin, you can easily access and manage the information stored in your kintone app. The source code of this plugin is available in the GitHub repository.
⚠️ Note: This is an unofficial plugin
This plugin is not developed or maintained by Cybozu, the provider of kintone. It is a community-developed plugin created by independent developers. Use at your own discretion.
kintone_flatten_json tool.record_data syntax referencerecord_data with a dedicated tool before adding recordsrecords_data payloads from a JSON string or array input with automatic updateKeyvalue array) from a JSON string or array inputkintone_domain and kintone_api_token. The token accepts up to nine comma-separated entries (e.g., token1,token2); providing ten or more triggers a validation error.{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92"
}
field1 is 100 or greater{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"query": "field1 >= 100"
}
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"fields": "field1,field2,field3"
}
Optional parameter: specify request_timeout (seconds) to adjust the API timeout (default 30 seconds).
You can also use the optional output_mode parameter to choose the response format.
| Value | Behavior |
|---|---|
both (default) | Returns text and JSON together. |
text_only | Returns only text. |
json_stream | Streams JSON page-by-page (no text). |
flattened_json | Returns kintone records flattened into an array of plain objects. |
A typical response looks like:
Text:
取得したレコード件数: 12
CustomerName: ACME Inc.
Representative: Yamada
---
CustomerName: Beta Trading
Representative: Sato
...
JSON:
{
"summary": {
"total_records": 12,
"requests_made": 3,
"request_limit": 500,
"initial_offset": 0,
"final_offset": 1000,
"used_pagination": true,
"fields": ["CustomerName", "Representative"],
"effective_query": "Status = \"完了\" order by 更新日時 desc",
"user_defined_limit": null,
"user_defined_offset": null
},
"records": [
{
"CustomerName": {"type": "SINGLE_LINE_TEXT", "value": "ACME Inc."},
"Representative": {"type": "SINGLE_LINE_TEXT", "value": "Yamada"}
},
{
"CustomerName": {"type": "SINGLE_LINE_TEXT", "value": "Beta Trading"},
"Representative": {"type": "SINGLE_LINE_TEXT", "value": "Sato"}
},
...
]
}
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92"
}
Returns basic information such as field codes and field types. Information about related records is not included.
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"detail_level": true
}
When detail_level is true, the tool returns the complete field definition as provided by kintone. When omitted or set to false, only the primary information is returned.
Returns documentation explaining the kintone query syntax.
Convert the raw record array (typically the JSON returned by kintone_query) into flattened objects.
{
"records_json": [
{
"$id": {"value": "2"},
"TXT1": {"value": "eee"},
"NUM1": {"value": "123"},
"TABLE1": {
"type": "SUBTABLE",
"value": [
{
"id": "166884",
"value": {
"TXT11": {"value": "ooo"},
"NUM2": {"value": "456"}
}
}
]
}
}
]
}
Response (text output mirrors the JSON message):
[
{
"$id": "2",
"NUM1": "123",
"TABLE1": [
{ "id": "166884", "NUM2": "456", "TXT11": "ooo" }
],
"TXT1": "eee"
}
]
{
"records_json": [
{
"$id": {"value": "2"},
"TXT1": {"value": "eee"},
"NUM1": {"value": "123"},
"TABLE1": {
"type": "SUBTABLE",
"value": [
{
"id": "166884",
"value": {
"TXT11": {"value": "ooo"},
"NUM2": {"value": "456"}
}
}
]
}
}
],
"subtable_field_code": "TABLE1",
"fields": "TXT1,NUM1,TXT11"
}
Response:
[
{ "TXT1": "eee", "NUM1": "123", "TXT11": "ooo" }
]
subtable_field_code limits the output to the specified SUBTABLE rows, while fields (comma separated) keeps only the requested field codes and copies parent-level fields into each subtable row.
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"record_data": {
"text_field": {"value": "Sample text"},
"number_field": {"value": "100"},
"date_field": {"value": "2025-03-09"}
}
}
Optional parameter: specify request_timeout (seconds) to adjust the API timeout (default 10 seconds).
Update one existing record. If the target record does not exist, the call fails.
If you need upsert behavior (insert when not found), use kintone_upsert_records instead.
There are three example patterns; in all of them, record_data uses the same structure as kintone_add_record and only the specified fields are updated.
record_id{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"record_id": "45",
"record_data": {
"メモ": {"value": "最新情報に更新しました"},
"ステータス": {"value": "対応中"}
}
}
updateKey in { "field": "...", "value": "..." } format{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"updateKey": { "field": "顧客ID", "value": "CUST-001" },
"record_data": {
"メモ": {"value": "最新情報に更新しました"},
"ステータス": {"value": "対応中"}
}
}
updateKey and the value via updateKeyValue{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"updateKey": "顧客ID",
"updateKeyValue": "CUST-001",
"record_data": {
"メモ": {"value": "最新情報に更新しました"},
"ステータス": {"value": "対応中"}
}
}
record_id or updateKey. For updateKey, you may use pattern 2) or 3).
Optional parameter: request_timeout (seconds) sets the timeout for the update request (default 30 seconds).Returns a JSON syntax guide for record_data used by kintone_add_record or kintone_update_record. No parameters are required. The response contains sample structures, rules by field type, validation rules, and common errors.
Validates the record_data JSON string you will pass to kintone_add_record or kintone_update_record, against the field definitions of the app.
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"record_data": "{\"text_field\": {\"value\": \"Sample text\"}, \"number_field\": {\"value\": 100}}"
}
If the structure and types pass validation, the tool returns the formatted JSON as-is. If validation fails—for example, when a field specified in record_data does not exist in the target app—the tool returns a message with detailed error information.
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"record_id": "456",
"comment_text": "Please review the updated quote.",
"mentions": "[{\"code\": \"sales-team\", \"type\": \"GROUP\"}]"
}
The tool posts plain-text comments to the record’s discussion thread. comment_text accepts up to 10,000 characters. Use the optional mentions parameter to highlight users, groups, or departments by supplying a JSON array with objects such as { "code": "user01", "type": "USER" }. Supported type values are USER, GROUP, and ORGANIZATION. Up to ten mentions can be specified per comment.
When the call succeeds, the response includes:
response variable with the raw JSON from kintone (creator info, timestamps, etc.)json message summarizing comment_id, record_id, app_id, mentions_count, and created_atOptional parameter: request_timeout (seconds) to override the default 10-second timeout.
Fetch comments posted on a record by specifying its record ID. If you leave limit empty and offset at the default 0, all comments for the record are retrieved.
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"record_id": "456",
"order": "asc",
"offset": 0
}
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"record_id": "456",
"order": "desc",
"offset": 0,
"limit": 15
}
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"records_data": {
"records": [
{
"record": {
"text_field": {"value": "Sample text 1"},
"number_field": {"value": "100"},
"date_field": {"value": "2025-03-09"}
}
},
{
"record": {
"text_field": {"value": "Sample text 2"},
"number_field": {"value": "200"},
"date_field": {"value": "2025-03-10"}
}
}
]
}
}
updateKey{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_app_id": "123",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"records_data": {
"records": [
{
"updateKey": {
"field": "key_field",
"value": "unique_value_1"
},
"record": {
"text_field": {"value": "Updated text 1"},
"number_field": {"value": "150"}
}
},
{
"updateKey": {
"field": "key_field",
"value": "unique_value_2"
},
"record": {
"text_field": {"value": "Updated text 2"},
"number_field": {"value": "250"}
}
}
]
}
}
Convert a JSON string or array of objects into the records_data payload expected by kintone_upsert_records, automatically populating the updateKey.
{
"records_source": "[{\"コード\": \"A-001\", \"名称\": \"初期データ\"}, {\"コード\": \"A-002\", \"名称\": \"2件目\"}]",
"updateKey": "コード"
}
Response example:
{
"records_data": {
"records": [
{
"updateKey": {"field": "コード", "value": "A-001"},
"record": {
"コード": {"value": "A-001"},
"名称": {"value": "初期データ"}
}
},
{
"updateKey": {"field": "コード", "value": "A-002"},
"record": {
"コード": {"value": "A-002"},
"名称": {"value": "2件目"}
}
}
]
}
}
Transform a JSON string or array into the value array required by a kintone subtable field.
{
"subtable_source": "[{\"セッションID\": \"D1-101\", \"タイトル\": \"Example\"}]"
}
Response example:
{
"value": [
{
"value": {
"セッションID": {"value": "D1-101"},
"タイトル": {"value": "Example"}
}
}
]
}
You can also submit an array directly:
{
"subtable_source": [
{"セッションID": "D1-101", "タイトル": "Example"},
{"セッションID": "D1-102", "タイトル": "Another"}
]
}
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"file_key": "20250301010101E3C4F3D8871A4BA28360BA3F798D0455165"
}
kintone_query tool to retrieve records that include the attachment field."Attachment": [{"fileKey": "xxxxxxxx"}]).fileKey value to the file_key parameter of this tool.Specify one or more files via upload_file. Dify automatically supplies the file data, so you do not need to provide it in JSON. You can optionally specify request_timeout.
{
"kintone_domain": "dev-demo.cybozu.com",
"kintone_api_token": "BuBNIwbRRaUvr33nWXcfUZ5VhaFsJxN0xH4NPN92",
"file_names": "report.pdf"
}
The response always contains the uploaded_files variable, a list of objects that hold the returned fileKey values.
uploaded_files = [{"fileKey": "c15b3870-7505-4ab6-9d8d-b9bdbc74f5d6"}]uploaded_files = [{"fileKey": "c15b3870-7505-4ab6-9d8d-b9bdbc74f5d6"}, {"fileKey": "a12b3456-7890-1ab2-3d4d-b5bdbc67f8d9"}]Standard outputs are populated as follows:
json: when records_mapping is omitted, it contains {"uploaded_files": [...]}; when provided, it contains {"records_data": {...}} so you can pass it straight to kintone_upsert_records.text: mirrors the JSON payload above (either the uploaded-files list or the records_data JSON string).uploaded_files / records_data variable messages continue to be emitted for backward compatibility.Key parameters:
upload_file (required, files): one or more files to upload.file_names (optional, string or JSON array): overrides the filenames sent to kintone. Provide a string for a single file, or a JSON array (e.g. ["a.pdf", "b.pdf"]) with the same length as the number of files.records_mapping (optional, string or JSON object): supply mapping instructions to auto-build the records payload for kintone_upsert_records (see below).request_timeout (optional, number): timeout in seconds for the kintone API request (default 30 seconds).When records_mapping is supplied, the tool also outputs records_data, a JSON string that can be passed directly to kintone_upsert_records.
If you provide file_names, you can override the filenames sent to kintone. Supply a single string for one file, or a JSON array (for example ["a.pdf", "b.pdf"]) with the same number of entries as the files you upload.
records_mapping expects a JSON object with a records array. Each element must include an attachment_field (string) and optional kintone fields under record plus any updateKey. How file keys are assigned is determined by the length of records:
records has 1 item, all uploaded files are attached to that single record.records length equals the number of uploaded files, the tool assigns files one-to-one in order.Practical examples:
{
"records": [
{
"updateKey": {"field": "顧客ID", "value": "CUST-001"},
"attachment_field": "添付ファイル",
"record": {
"メモ": {"value": "最新のレポートを添付しました"}
}
}
]
}
{
"records": [
{
"attachment_field": "添付ファイル",
"record": {
"タイトル": {"value": "議事録 A"}
}
},
{
"attachment_field": "添付ファイル",
"record": {
"タイトル": {"value": "議事録 B"}
}
}
]
}
{
"records": [
{
"attachment_field": "ファイル",
"record": {
"部門": {"value": "営業"},
"担当者": {"value": "山田"}
}
},
{
"attachment_field": "ファイル",
"record": {
"部門": {"value": "開発"},
"担当者": {"value": "佐藤"}
}
}
]
}
Rules summary: records must be a non-empty array. Every element needs attachment_field; record defaults to {} if omitted. With multiple records, the array length must equal the uploaded file count so each record gets exactly one file key.
Upsert behavior: when updateKey is provided, kintone will update the matching record or insert a new one if no match is found (upsert). If you omit updateKey, each entry is treated as a new record insert.
If you prefer not to use records_mapping, you can build records_data manually with standard Dify nodes:
nodes.upload_file_to_kintone.outputs.json.uploaded_files and capture each fileKey (alongside any known updateKey information such as record IDs). Example:
- id: loop_records
type: loop
loop_variable: "{{ nodes.upload_file_to_kintone.outputs.json.uploaded_files }}"
parameters:
update_key_field: "{{ inputs.update_key_field }}"
update_key_values: "{{ inputs.update_key_values }}" # e.g., comma-separated list → split inside the loop
{ "records": [...] } payload by inserting the collected file keys into the attachment field structure ({"value": [{"fileKey": ...}]}) required by kintone_upsert_records.records_data.This loop + template pattern lets you control how file keys are grouped across records—for example, gather all keys and attach them to a single record, or map each key to a different record using the loop index—without enabling records_mapping.
If you prefer a Python script node, you can assemble the payload in code and emit records_data directly. The snippet below reads from the JSON output and writes back a JSON string:
import json
file_keys = nodes.upload_file_to_kintone.outputs["json"]["uploaded_files"]
records = []
for fk in file_keys:
records.append({
"updateKey": {"field": inputs.update_key_field, "value": inputs.update_key_value},
"record": {
"添付ファイル": {"value": [{"fileKey": fk["fileKey"]}]}
}
})
outputs["records_data"] = json.dumps({"records": records}, ensure_ascii=False)
Using records_mapping bypasses all of these extra nodes/scripts so the workflow can simply be kintone_upload_file → kintone_upsert_records by selecting nodes.upload_file_to_kintone.outputs.json.records_data for the records_data parameter (or text if you prefer the raw JSON string).
The kintone_integration plugin respects user privacy and keeps the exchanged data limited to what is strictly necessary for each tool.
record_data, records, updateKey, etc.) that you provide.*.cybozu.com domains).All plugin operations—record queries, validation, creation/upsert, and file upload/download—use kintone's official REST APIs. For kintone-side privacy policies, please refer to: cybozu.com Terms of Use.
For privacy-related questions, please contact the repository maintainers via GitHub issues.
If you encounter any issues or have questions, please:
"kintone" is a registered trademark of Cybozu, Inc.
The information provided here is for reference only. Support is not available for individual environments. We are unable to respond to inquiries about configuration details or cases where the plugin does not work in your environment.