Use Power Automate's HTTP Connector to Send Custom Kintone API Requests
Overview
This article introduces a method to post Microsoft Forms responses into Kintone by running Kintone REST APIs with the HTTP connector of Power Automate.
Microsoft Power Automate is an integration tool that can connect Kintone with various services, for example, Gmail, Slack, and ChatGPT.
By using Power Automate's built-in Kintone connectors, Kintone can be integrated with other services without coding.
Kintone connectors are easy to use, as endpoints and parameter names are already predefined. However, there may be limitations regarding the types of endpoints and parameters that can be used. To bypass these limitations, the HTTP connector can be used instead of the built-in connectors. This approach provides greater flexibility, allowing more selection of endpoints and parameters that can be defined.
This article explains how to use the HTTP connector to run Kintone REST APIs by specifying custom endpoints and parameters. In this example, the HTTP connector will call the Add Record API, which will add a record into a Kintone App.
General Flow
The general flow of the operation is as follows:
- When a form response is submitted via Microsoft Forms, it triggers Power Automate to get the response details.
- The HTTP connector initiates a Kintone REST API.
- A new record of the submitted response is added in the Kintone App.
Required Environments
In addition to a Kintone environment, the following will also need to be prepared:
- A user with Kintone Users & System Administrators permission.
Users & System Administrators - A Microsoft account
Attention
The HTTP connector used in this article is a Premium connector, so a paid license for Power Automate is required. Please note that Power Automate included in Office 365 cannot use Premium connectors.
For more details, refer to the following links:
Set Up the Integration
This section describes how to set up a Kintone App and a form for Microsoft Forms. The two services are then integrated using Power Automate.
Create a Kintone App
First, create a new Kintone App to compile the responses collected in Microsoft Forms.
Set the fields in the Kintone App as follows.
Field Type | Field Name | Field Code |
---|---|---|
Date | Date | date |
Text | Name | name |
Text | Feedback | feedback |
Next, follow the steps in the following article to generate an API token.
Grant the Add Records permission and take note of the API token, as it is needed for the integration in the later steps.
Create a Microsoft Form
Sign in to Microsoft 365 and create a form within Microsoft Forms.
- Create a new form by clicking New Form at the top of the Microsoft Forms page.
- "Untitled Form" will be displayed. Change the title to "Kintone Survey Form".
- Click the Quick start with button, choose the Date field, and name it "Date". Proceed to click on Add new question to add more fields. Add two Text fields, and name them "Name" and "Feedback".
Connect Kintone and Microsoft Forms with Power Automate
First, create a new flow in Power Automate.
-
Create a flow by selecting Create from the left menu, then click Automated cloud flow.
-
Set the flow name to "Form to Kintone" and choose When a response is submitted, then click Create.
Next, add a flow that will be triggered when a form is submitted.
-
For the Form Id field, select the form that was created in the previous step.
-
Add an action by clicking the + New step button.
-
Search for "forms", and select the Get response details action of Microsoft Forms.
-
For the Form Id field, select the same form that was created in the previous steps. Set the Response Id field from the dynamic content in the Response Id field.
-
Add an action by clicking the + New step button. On the component to choose an operation, search for "HTTP" and select the HTTP connector.
-
Set the information as follows:
Field Value Method POST URI https://{subdomain}.kintone.com/k/v1/record.json Headers - Key: X-Cybozu-API-Token
Value: {The Kintone App's API token} - Key: Content-Type
Value: application/json
Body {
"app": <your App ID>,
"record": {
"date": {
"value": "<Select 'Date' from dynamic content>"
},
"name": {
"value": "<Select 'Name' from dynamic content>"
},
"feedback": {
"value": "<Select 'Feedback' from dynamic content>"
}
}
}The HTTP connector details should look like the following.
The values inside the body can be selected from the Dynamic content component.
- Key: X-Cybozu-API-Token
-
Click the Save button so that the integration flow is activated.
Test the Integration
Submit a response through the Microsoft Form. Power Automated will be triggered, and a new record will be added into Kintone.
After the response is sent, open the Kintone App and check if the record is added.