Kintone

The Kintone connector lets you perform insert, delete, update, and read operations on Kintone database.

Before you begin

Before using the Kintone connector, do the following tasks:

  • In your Google Cloud project:
    • Ensure that network connectivity is set up. For information about network patterns, see Network connectivity.
    • Grant the roles/connectors.admin IAM role to the user configuring the connector.
    • Grant the following IAM roles to the service account that you want to use for the connector:
      • roles/secretmanager.viewer
      • roles/secretmanager.secretAccessor

      A service account is a special type of Google account intended to represent a non-human user that needs to authenticate and be authorized to access data in Google APIs. If you don't have a service account, you must create a service account. For more information, see Creating a service account.

    • Enable the following services:
      • secretmanager.googleapis.com (Secret Manager API)
      • connectors.googleapis.com (Connectors API)

      To understand how to enable services, see Enabling services.

    If these services or permissions have not been enabled for your project previously, you are prompted to enable them when configuring the connector.

Configure the connector

Configuring the connector requires you to create a connection to your data source (backend system). A connection is specific to a data source. It means that if you have many data sources, you must create a separate connection for each data source. To create a connection, do the following steps:

  1. In the Cloud console, go to the Integration Connectors > Connections page and then select or create a Google Cloud project.

    Go to the Connections page

  2. Click + CREATE NEW to open the Create Connection page.
  3. In the Location section, choose the location for the connection.
    1. Region: Select a location from the drop-down list.

      For the list of all the supported regions, see Locations.

    2. Click NEXT.
  4. In the Connection Details section, complete the following:
    1. Connector: Select Kintone from the drop down list of available Connectors.
    2. Connector version: Select the Connector version from the drop down list of available versions.
    3. In the Connection Name field, enter a name for the Connection instance.

      Connection names must meet the following criteria:

      • Connection names can use letters, numbers, or hyphens.
      • Letters must be lower-case.
      • Connection names must begin with a letter and end with a letter or number.
      • Connection names cannot exceed 49 characters.
    4. Optionally, enter a Description for the connection instance.
    5. Optionally, enable Cloud logging, and then select a log level. By default, the log level is set to Error.
    6. Service Account: Select a service account that has the required roles.
    7. Optionally, configure the Connection node settings:

      • Minimum number of nodes: Enter the minimum number of connection nodes.
      • Maximum number of nodes: Enter the maximum number of connection nodes.

      A node is a unit (or replica) of a connection that processes transactions. More nodes are required to process more transactions for a connection and conversely, fewer nodes are required to process fewer transactions. To understand how the nodes affect your connector pricing, see Pricing for connection nodes. If you don't enter any values, by default the minimum nodes are set to 2 (for better availability) and the maximum nodes are set to 50.

    8. Allow Special Characters: Determines whether or not to allow special characters. If true special characters will not be replaced.
    9. Check For Subtables In: A comma-separated list of Kintone apps to retrieve subtables from.
    10. Guest Space Id: Restrict query results to a guest space.
    11. Number Map To Double: Determines whether or not to change the datatype of number fields from decimal to double.
    12. Subtable Separator Character: The character used for dividing tables from subtables in the format tablename + char + subtable.
    13. Use Code For Field Name: Determines whether to use Label or Code for Field Name.
    14. Use Cursor: Boolean determining if cursors should be used to retrieve records.
    15. User Defined Views: A filepath pointing to the JSON configuration file containing your custom views.
    16. Use proxy: Select this checkbox to configure a proxy server for the connection and configure the following values:
      • Proxy Auth Scheme: Select the authentication type to authenticate with the proxy server. The following authentication types are supported:
        • Basic: Basic HTTP authentication.
        • Digest: Digest HTTP authentication.
      • Proxy User: A user name to be used to authenticate with the proxy server.
      • Proxy Password: The Secret manager secret of the user's password.
      • Proxy SSL Type: The SSL type to use when connecting to the proxy server. The following authentication types are supported:
        • Auto: Default setting. If the URL is an HTTPS URL, then the Tunnel option is used. If the URL is an HTTP URL, then the NEVER option is used.
        • Always: The connection is always SSL enabled.
        • Never: The connection is not SSL enabled.
        • Tunnel: The connection is through a tunneling proxy. The proxy server opens a connection to the remote host and traffic flows back and forth through the proxy.
      • In the Proxy Server section, enter details of the proxy server.
        1. Click + Add destination.
        2. Select a Destination Type.
          • Host address: Specify the hostname or IP address of the destination.

            If you want to establish a private connection to your backend system, do the following:

    17. Optionally, click + ADD LABEL to add a label to the Connection in the form of a key/value pair.
    18. Click NEXT.
  5. In the Destinations section, enter details of the remote host (backend system) you want to connect to.
    1. Destination Type: Select a Destination Type.
      • Select Host address from the list to specify the hostname or IP address of the destination.
      • If you want to establish a private connection to your backend systems, select Endpoint attachment from the list, and then select the required endpoint attachment from the Endpoint Attachment list.

      If you want to establish a public connection to your backend systems with additional security, you can consider configuring static outbound IP addresses for your connections, and then configure your firewall rules to allowlist only the specific static IP addresses.

      To enter additional destinations, click +ADD DESTINATION.

    2. Click NEXT.
  6. In the Authentication section, enter the authentication details.
    1. Select an Authentication type and enter the relevant details.

      The following authentication types are supported by the Kintone connection:

      • Username and password
      • Anonymous
    2. To understand how to configure these authentication types, see Configure authentication.

    3. Click NEXT.
  7. Review: Review your connection and authentication details.
  8. Click Create.

Configure authentication

Enter the details based on the authentication you want to use.

  • Username and password
    • Username: Username for connector
    • Password: Secret Manager Secret containing the password associated with the connector.
    • Basic Auth Password: The additional password required for domains using basic authentication.
    • Basic Auth User: The additional username required for domains using basic authentication.
  • Anonymous

    If you want to use anonymous login, select Not Available.

    • API Token: Secret Manager Secret containing the API Token for authentication.
    • App Id: The AppId used along with the APIToken for authentication.

Entities, operations, and actions

All the Integration Connectors provide a layer of abstraction for the objects of the connected application. You can access an application's objects only through this abstraction. The abstraction is exposed to you as entities, operations, and actions.

  • Entity: An entity can be thought of as an object, or a collection of properties, in the connected application or service. The definition of an entity differs from a connector to a connector. For example, in a database connector, tables are the entities, in a file server connector, folders are the entities, and in a messaging system connector, queues are the entities.

    However, it is possible that a connector doesn't support or have any entities, in which case the Entities list will be empty.

  • Operation: An operation is the activity that you can perform on an entity. You can perform any of the following operations on an entity:

    Selecting an entity from the available list, generates a list of operations available for the entity. For a detailed description of the operations, see the Connectors task's entity operations. However, if a connector doesn't support any of the entity operations, such unsupported operations aren't listed in the Operations list.

  • Action: An action is a first class function that is made available to the integration through the connector interface. An action lets you make changes to an entity or entities, and vary from connector to connector. Normally, an action will have some input parameters, and an output parameter. However, it is possible that a connector doesn't support any action, in which case the Actions list will be empty.

System limitations

The Kintone connector can process 5 transactions per second, per node, and throttles any transactions beyond this limit. By default, Integration Connectors allocates 2 nodes (for better availability) for a connection.

For information on the limits applicable to Integration Connectors, see Limits.

Actions

This section lists the actions supported by the connector. To understand how to configure the actions, see Action examples.

AppsDeployStatus action

This action gets app deployment statuses

Input parameters of the AppsDeployStatus action

Parameter Name Data Type Required Description
AppIds String Yes The Id of the app. This can be a list of comma-separated Ids.
GuestSpaceId String No This parameter is used for apps that are in the guest space. Do not add this parameter if the connection property GuestSpaceId is specified in the connection string.

For example on how to configure the AppsDeployStatus action, see Action examples.

CreateApp action

This action creates apps.

Input parameters of the CreateApp action

Parameter Name Data Type Required Description
Name String Yes Specify the name of the application in less than 64 characters.
Space String No The Id of the space. Do not specify this if the connection property GuestSpaceId is set in the connection string.
ThreadId String No The Id of the space. Do not specify this if the connection property GuestSpaceId is set in the connection string.
IsGuestSpace Boolean No This is a boolean value that indicates whether the Space parameter is a normal space or a guest space. Set this value to true for guest spaces. The default value is false.

For example on how to configure the CreateApp action, see Action examples.

DeleteGuests action

This action let users Delete Guests.

Input parameters of the DeleteGuests action

Parameter Name Data Type Required Description
Guests String Yes A list of email addresses of Guest users. Up to 100 Guests can be deleted.

For example on how to configure the DeleteGuests action, see Action examples.

DeployApps action

This action lets you deploy apps.

Input parameters of the DeployApps action

Parameter Name Data Type Required Description
AppId String Yes The App Id. This can be a list of comma-separated Ids.
Revision String No Specify the revision of the setting that reflects the operational environment. If the specified revision is not up to date, the request will fail.
Revert Boolean No If you want to cancel the change to the application settings, set this to true. The default value is false.
GuestSpaceId String No This parameter is used for apps that are in the guest space. Do not add this parameter if the connection property GuestSpaceid is specified in the connection string.

For example on how to configure the DeployApps action, see Action examples.

DownloadFile action

This action let users download files from an attachment field in an app.

Input parameters of the DownloadFile action

Parameter Name Data Type Required Description
FileKey String Yes The Id of the file.
HasBytes Boolean No Whether to download content as bytes. The valid values are true or false. If set to true, the file is downloaded as a Base64 encoded string.

By default, the HasBytes field is set to false.

For example on how to configure the DownloadFile action, see Action examples.

UpdateAssignees action

This action let users update assignees.

Input parameters of the UpdateAssignees action

Parameter Name Data Type Required Description
AppId String Yes The App Id.
RecordId String Yes RecordId
Assignees String Yes The user codes of the assignees. If empty, no users will be assigned. The maximum number of assignees is 100.
Revision String No The revision number of the record before updating the assignees. If the specified revision is not the latest revision, the request will result in an error.
GuestSpaceId String No This parameter is used for apps that are in the guest space. Do not add this parameter if the connection property GuestSpaceId is specified in the connection string.

For example on how to configure the UpdateAssignees action, see Action examples.

AddGuests action

This action let users add Guests.

Input parameters of the AddGuests action

Parameter Name Data Type Required Description
Name String false The display name of the user. Must be between 1 - 128 characters.
Code String No The email address (log in name) of the Guest user.
Password String No The log in password of the Guest user. It must be alphanumeric.
Timezone String No The timezone of the Guest user.
Locale String No The language settings of the Guest user. Available values are auto, en, zh, ja. If not provided, auto will be set as default.
Image String No The profile image of the Guest user. Specify a fileKey of an uploaded file.
SurNameReading String No The Phonetic Surname settings of the Guest User. The maximum limit is 64 characters.
GivenNameReading String No The Phonetic Given Name settings of the Guest User. The maximum limit is 64 characters.
Company String No The Company name to display on the Guest User's profile.
Division String No The Department name to display on the Guest User's profile.
Phone String No The Phone number to display on the Guest User's profile.
CallTo String No The Skype Name of the Guest user.
GuestsAggregate String No The Guests Aggregate.

For example on how to configure the AddGuests action, see Action examples.

UploadFile action

This action lets you upload a file.

Input parameters of the UploadFile action

Parameter Name Data Type Required Description
FileName String Yes The name you would like to give the document. If none is specified, the file name specified in the FullPath input will be used.
Content String No The content as InputStream to be uploaded when FullPath is not specified.
ContentBytes String No Bytes content (as a Base64 string) to upload as a file. Use this to upload binary data.
AppId String No The Kintone App Id. This is required when AttachToApp set to true.
HasBytes Boolean No Whether to upload content as bytes. The valid values are true or false. If set to true, the file content should be Base64 encoded string.

By default, the HasBytes field is set to false.

AddThreadComment action

This action let users add comments in thread

Input parameters of the AddThreadComment action

Parameter Name Data Type Required Description
SpaceId Integer Yes The Id of the space.
ThreadId Integer Yes The Id of the thread.
Text String No The comment contents. A line break can be specified by LF. The maximum characters of the comment is 65535. Required, if files is not set.
Mentions String No An array including mentions, that notify other Kintone users.
Files String No An array including data of attachment files. The maximum number of the files is 5. Required, if text is not set.

For example on how to configure the AddThreadComment action, see Action examples.

UpdateThread action

This action let you update a thread

Input parameters of the UpdateThread action

Parameter Name Data Type Required Description
ThreadId Integer Yes The Thread ID. The Thread ID can be found in the URL of the Thread.
Name String No The new name of the Thread. Must be between 1 - 128 characters. The name will not be updated if this parameter is ignored. The Thread name of single threaded Spaces cannot be updated.
Body String No The contents of the Thread body.

For example on how to configure the UpdateThread action, see Action examples.

Action examples

This section describes how to perform some of the actions in this connector.

Example - Get app deployment status

This example gets the app deployment status.

  1. In the Configure connector task dialog, click Actions.
  2. Select the AppsDeployStatus action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "AppIds": "4"
    }
    
  4. If the action is successful, the AppsDeployStatus task's connectorOutputPayload response parameter will have a value similar to the following:

    {
    "AppId": "4",   "Status": "SUCCESS",   "success": "true"
    }

Example - Create an app

This example creates a new app.

  1. In the Configure connector task dialog, click Actions.
  2. Select the CreateApp action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "Name": "NewApp"
    }
  4. If the action is successful, the CreateApp task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "AppId": "20",   "Revision": "2",   "Success": "true"
    }]

Example - Deploy an app

This example deploys an app

  1. In the Configure connector task dialog, click Actions.
  2. Select the DeployApps action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "AppId": "19",   "Revision": "2"
    }
  4. If the action is successful, the DeployApps task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "Success": "true"
    }]

Example - Download a file

This example downloads a file present in an app.

  1. In the Configure connector task dialog, click Actions.
  2. Select the DownloadFile action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "FileKey": "2024022706351283F683AABB3A4FA09AF1D28049"
    }
  4. If the action is successful, the DownloadFile task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "Success": "True",
    "Content": "Record number, Number, Text\n49, 162, Hello"
    }]

Example - Update an assignee

This example updates an assignee.

  1. In the Configure connector task dialog, click Actions.
  2. Select the UpdateAssignees action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "FileKey": "2024022706351283F683AABB3A4FA09AF1D28049"
    }
  4. If the action is successful, the UpdateAssignees task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "Success": "True",
    "Content": "Record number, Number, Text\n49, 162, Hello"
    }]

Example - Add a guest

This example adds a guest.

  1. In the Configure connector task dialog, click Actions.
  2. Select the AddGuests action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "GuestsAggregate": "[{\"name\":\"Testuser\",\"code\":\"testuser1@test.com\",
    \"password\":\"test@123\",\"timezone\":\"America/Los_Angeles\",
    \"company\":\"Company Name\",\"division\": \"Sales\",
    \"callto\":\"SkypeCallTo\",\"locale\":\"en\"}]"
    }
  4. If the action is successful, the AddGuests task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "Success": "true"
    }]

Example - Delete a guest

This example deletes a guest.

  1. In the Configure connector task dialog, click Actions.
  2. Select the DeleteGuests action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "Guests": "[\"testuser1@test.com\"]"
    }
  4. If the action is successful, the DeleteGuests task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "Success": "true"
    }]

Example - Upload a file

This example shows how to upload a file.

  1. In the Configure connector task dialog, click Actions.
  2. Select the UploadFile action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "FileName": "GoogleCloud_Upload_File.txt",
    "AppId": "9",
    "Content": "Hello"
    }
  4. If the action is successful, the UploadFile task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "FileKey": "4e3b6ca9-0028-41c6-9662-53b151ef9b35",
    "Success": "true",
    "Id": null,
    "Revision": null
    }]

Example - Add a thread comment

This example shows how to add a thread comment.

  1. In the Configure connector task dialog, click Actions.
  2. Select the AddThreadComment action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "SpaceId": 1.0,
    "ThreadId": 1.0,
    "Text": "Test Comment"
    }
  4. If the action is successful, the AddThreadComment task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "Id": "3",
    "Success": "true"
    }]

Example - Update a thread

This example shows how to update a thread.

  1. In the Configure connector task dialog, click Actions.
  2. Select the UpdateThread action, and then click Done.
  3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "ThreadId": 1.0,
    "Name": "updated thread"
    }
  4. If the action is successful, the UpdateThread task's connectorOutputPayload response parameter will have a value similar to the following:

    [{
    "Success": "true"
    }]

Entity operation examples

This section shows how to perform some of the entity operations in this connector.

Example - List all apps

  1. In the Configure connector task dialog, click Entities.
  2. Select Apps from the Entity list.
  3. Select the List operation, and then click Done.
  4. Optionally, in Task Input section of the Connectors task, you can filter your result set by specifying a filter clause. Specify the filter clause value always within the single quotes (').

Example - Get an app

  1. In the Configure connector task dialog, click Entities.
  2. Select Apps from the Entity list.
  3. Select the Get operation, and then click Done.
  4. In the Task Input section of the Connectors task, click EntityId and then enter 4 in the Default Value field.

    Here, 4 is a unique record ID in the Apps entity.

Example - Delete a record

  1. In the Configure connector task dialog, click Entities.
  2. Select Record from the Entity list.
  3. Select the Delete operation, and then click Done.
  4. In the Task Input section of the Connectors task, click entityId and then enter 6 in the Default Value field.

Example - Create a record

  1. In the Configure connector task dialog, click Entities.
  2. Select Record from the Entity list.
  3. Select the Create operation, and then click Done.
  4. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "Text": "HelloDemo"
    }

    Running this example, returns a response similar to the following in the connector task's connectorOutputPayload output variable:

    {
    "RecordId": 29.0
    }

Example - Update a record

  1. In the Configure connector task dialog, click Entities.
  2. Select Record from the Entity list.
  3. Select the Update operation, and then click Done.
  4. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
    {
    "Text_area": "updatedemo"
    }
  5. Click entityId, and then enter 22 in the Default Value field.

    Running this example, returns a response similar to the following in the connector task's connectorOutputPayload output variable:

    {
    "RecordId": "22"
    }

Use terraform to create connections

You can use the Terraform resource to create a new connection.

To learn how to apply or remove a Terraform configuration, see Basic Terraform commands.

To view a sample terraform template for connection creation, see sample template.

When creating this connection by using Terraform, you must set the following variables in your Terraform configuration file:

Parameter name Data type Required Description
allow_special_characters BOOLEAN False Determines whether or not to allow special characters. If true special characters will not be replaced.
check_for_subtables_in STRING True A comma-separated list of Kintone apps to retrieve subtables from.
guest_space_id STRING False Restrict query results to a guest space.
number_map_to_double BOOLEAN False Determines whether or not to change the datatype of number fields from decimal to double.
subtable_separator_character STRING True The character used for dividing tables from subtables in the format tablename + char + subtable.
use_code_for_field_name BOOLEAN False Determines whether to use Label or Code for Field Name.
use_cursor BOOLEAN False Boolean determining if cursors should be used to retrieve records.
user_defined_views STRING False A filepath pointing to the JSON configuration file containing your custom views.
proxy_enabled BOOLEAN False Select this checkbox to configure a proxy server for the connection.
proxy_auth_scheme ENUM False The authentication type to use to authenticate to the ProxyServer proxy. Supported values are: BASIC, DIGEST, NONE
proxy_user STRING False A user name to be used to authenticate to the ProxyServer proxy.
proxy_password SECRET False A password to be used to authenticate to the ProxyServer proxy.
proxy_ssltype ENUM False The SSL type to use when connecting to the ProxyServer proxy. Supported values are: AUTO, ALWAYS, NEVER, TUNNEL

Use the Kintone connection in an integration

After you create the connection, it becomes available in both Apigee Integration and Application Integration. You can use the connection in an integration through the Connectors task.

  • To understand how to create and use the Connectors task in Apigee Integration, see Connectors task.
  • To understand how to create and use the Connectors task in Application Integration, see Connectors task.

Get help from the Google Cloud community

You can post your questions and discuss this connector in the Google Cloud community at Cloud Forums.

What's next