In this article, we will discuss an auto-step related to kintone.

kintone is a cloud database service provided by Cybozu. You can create and operate a business database that meets the needs of your company or departments. You can use the API to perform various operations and the auto-step introduced here also uses the API.

For more information about kintone please visit the official kintone help page.

About Each Auto-Step

The auto-steps related to kintone include Download Choice Data, Download File, Upload File, Add New Record, Delete Record, Get Record and Update Record. In this article, we will focus on three of them: Add Record, File Upload and Update Record.

First, we will give you a brief description of each step.

kintone: Add New Record

Setup screen for record adding process

You can add a business data record to the kintone app (database) so that you can save the ID of the added record in the Data Item you have selected.

kintone: Upload File

Setup screen for file upload process

You can upload a file to kintone. The upload destination is specified by the record ID and the field code of the attachment field (set on the kintone side).

kintone: Update Record

kintone: Update Record settings

You can update a record in the kintone app. You should specify the record ID of the record to be updated in the Data Item.

In addition, to use these auto-steps you need to generate an API token in kintone and save it in Questetra’s authentication settings. Please follow the steps below to set it up.

Setting up the Connection between kintone and Questetra

First, you need to generate an API token in your kintone app. The steps required for the sample app in this article will be explained later, but for general instructions on generating API tokens, please refer to the following page.

Generating API Tokens

In the properties of the kintone step in Questetra, click the [Set up Setting] button in [C1: Authorization Settings in which API Token is set].

Next, click the Add button, select “Token Fixed Value” from the drop-down list, enter a suitable name in the Name field and the token you just generated in the kintone app in the Token field, and then click [Save].

Sample App Overview

Sample apps for the kintone side
Sample App in Questetra using auto-steps

This application is for managing work schedules and reports. By saving the work data in kintone you can easily refer to the data in a list and search it, and by using Questetra’s timer function you can prompt the input of the work report on the scheduled work day.

Settings in kintone

1. Create a kintone app

Click the “+” button in the app block of the kintone portal.

For the purposes of this article we will create the app from the beginning, so select Add New App.

You should drag and drop each of the fields in the table below onto the form to set the field name, field code and other settings.

Reference: Procedure for setting field codes

Field nameField typeField codeOther settings
Work descriptionString (single line)Work descriptionCheck the “Required field” box.
Work dateDateWork dateCheck the “Required field” box.
Uncheck “Default to the record creation date”.
Work reportString (multiple lines)Work report
Attachment to the work reportAttachmentAttachment to the work report
Work statusRadio buttonWork statusSet the Options to “Not done” or “Done”. Select “Not done” as the Default Value.
2. Creating an API token

Create an API Token for linking kintone and Questetra. Open the [App Settings] tab of the app settings screen, and go to [API Token].

Check ‘View records’, ‘Add records’ and ‘Edit records’, click ‘Generate’ and make a note of the following three pieces of information

  • API token
  • Domain(xxxxx.kintone.com or xxxxx.cybozu.com)
  • App ID(##)

Then remember to click Save.

Don’t forget to click Update App on the next screen (otherwise the API token will not be saved).

Settings in Questetra

Create an App and set up the workflow diagram and Data Items as follows

Data Item NmaeData-typeRequired“Enter work schedule” step“Work report” stepDescription
TitleNoEditableDisplay onlyThe Process title
Work summary*String
(single line)
YesEditableDisplay onlyThis Data Item is for entering a summary of the work in the “Enter work schedule” Task.
Work date*DateYesEditableDisplay onlyThis Data Item is for entering the date the work was done in the “Enter work schedule” Task.
Work report*String
(multiple lines)
YesNot visibleEditableThis Data Item is for entering the contents of the report in the “Work report” Task.
Work report attachmentsFileNoNot visibleEditableThis Data Item is for uploading attachments to the work report.
Record ID*String (single line)YesNot visibleDisplay onlyThis stores the ID of the record added in the “Add Record” Task.
Data Item settings

First, in the “Enter work schedule” Task you should enter the work description and the work date. The next step is to create a record in kintone using the “Add record” step (see kintone: Add New Record).

Config. nameRequiredDescription
C1: Authorization Settings in which API Token is set*YesSpecify the authorization settings used to connect to kintone. For details on how to set this, please refer to ‘Setting up the connection between kintone and Questetra’.
C2: Domain*YesSpecify the kintone domain.
C4: App ID*YesSpecify the kintone app ID.
C5: String type data item that will save record IDNoSpecify the String-type Data Item to store the ID of the added record. In this case, “Record ID” is specified.
C6F: Field Code 1NoSpecify the field code of the kintone app where you want to save the data. In this case, you should enter the field code “Work summary” for the field where you want to store the work summary.
C6V: Value 1NoC6F: Specify the value of the data to be stored in the field specified by Field Code 1. In this case, you should insert an EL expression for the Data Item “Work summary”.
C7F: Field Code 2NoSpecify the field code of the kintone app where you want to save the data. In this case, enter the field code “Work date” for the field where you want to store the work days.
C7V: Value 2NoC7F: Specify the value of the data to be saved in the field specified by Field Code 2. This time insert the EL expression for the Data Item “Work date”.
Settings for kintone: Add New Record

We won’t be using any further settings this time.

Once you have saved the work schedule in kintone, you can proceed to the Timer Intermediate Event.

Setting nameDescription
Datetime specified by Data ItemSpecify the date and time when the Process will proceed to the next Task. In this case, we choose this option and specify the Data Item “Work date”.
Datetime specified by an expressionYou can use an expression to specify the date and time. Not used this time.
Timer Intermediate Event settings

This allows the process to wait until the scheduled working day.

※ Related manual: M223: Automatically Sleep for a Specified Period During A Process

When the work date arrives the Process will go to the Work report Task where you enter your work report and attach any documentation.

Once you have completed the Task you can upload attachments in the following File Upload Task (see kintone: Upload File) and then save the work report in the Record Update Task (see kintone: Update Record).

Config. nameRequiredDescription
C1: Authorization Setting in which API Token is setYesSpecify the authorization settings used to connect to kintone. For details on how to set this up please refer to ‘Setting up the connection between kintone and Questetra’.
C2: DomainYesSpecify the kintone domain.
C4: App IDYesSpecify the kintone App ID.
C5: Record IDYesSpecify the ID of the record to which the file will be attached. In this case, “Record ID” is specified.
C6: Field Code of Attachment fieldYesSpecify the field code of the kintone App to which you want to attach the file. In this case, we’ll enter the field code “Work report attachments”.
C7: File type data item whose attached files will be uploadedYesThis time, specify the File-type Data Item “Work report attachments”.
kintone: Upload File settings
Config. nameRequiredDescription
C1: Authorization Setting in which API Token is set*YesSpecify the authorization settings used to connect to kintone. For details on how to set this up please refer to ‘Setting up the connection between kintone and Questetra’.
C2: Domain*YesSpecify the kintone domain.
C4: App ID*YesSpecify the kintone App ID
C4: Record ID*YesSpecify the record ID you will update. This time you should specify “Record ID”.
C6F: Field Code 1NoSpecify the kintone App Field Code you will update. In this case, enter the Field Code “Work report” for the field where you want to store the work report.
C6V: Value 1NoC6F: Specify the value of the data to be stored in the field specified by Field Code 1. In this case, insert an EL expression for the Data Item “Work report”.
C7F: Field Code 2NoSpecify the Field Code of the kintone app you want to update the data with. In this case, enter the Field Code “Work status” for the field that stores the work status.
C7V: Value 2NoC7F: Specify the value of the data to be saved in the field specified in Field Code 2. This time, enter “Completed”.
kintone: Update Record settings

We won’t be using any further settings this time.

You should start the process and make sure that the record is added to kintone and that the record is updated.

That’s it for this time.

3 thoughts on “Using kintone from Workflow”

  1. Pingback: kintone: Add New Record – Questetra Support

  2. Pingback: kintone: Upload File – Questetra Support

  3. Pingback: kintone: Update Record – Questetra Support

Comments are closed.

%d bloggers like this: