The system created this time is a system that uploads a business card image to Slack, extracts information from the business card using Google's Vision API and Natural Language API, and registers it in kintone. The overall picture is as follows.
This hands-on is a combination of three services and the programming language Python. For that purpose, please make the following preparations.
You need kintone to create the app. If you do not have an account, please create one. https://kintone.cybozu.com/jp/
This time we will create a bot on Slack. So if you don't have a Slack account, create one below. https://slack.com/
Please set the team name etc. to Yoshina.
Programming with Python is performed to link various services. Please download and install Python 3.5.2 from the link below. https://www.python.org/downloads/
This time, we will use the GCP services Vision API and Natural Language API. For that, please register with GCP and get an API key.
First of all, please register for GCP from the link below. https://cloud.google.com/
Please note that you will be prompted for your credit card number </ font> when registering. However, the Vision API and Natural Language API are free up to 1000 and 5000 times use </ font>, respectively, so you will not be charged.
After logging in to GCP, first click on the "Create Project" section in the upper left.
A form will appear for you to create a new project. Here, enter the project name you like and click the "Create" button.
In the created project, we will enable it so that the desired "Cloud Vision API" can be used. First, click the menu button in the upper left and select "API Manager" in it.
Select "Library" to move to the API list screen provided by Google. Search for "vision" in the search form and select the Google Cloud Vision API that appears.
Go to the "Cloud Vision API" screen. Next to the title, there is a button to enable / disable, so please enable it.
If you've just created a project, you'll probably see an alert that says "Proceed to credentials", as you haven't set any authentication methods yet. In that case, select "Proceed to Credentials".
The "Add Credentials to Project" screen is displayed. Select "Cloud Vision API" for "Required credentials", select "No" for "Do you want to use Google App Engine or Google Compute Engine?", And select "Required credentials". Click the "" button.
Select "Service Account Name", "Key Type", and "Role" and click "Next". A service account is an "account for using the API", and a "key" is a file that contains information for authenticating with that account. In this article, we will not use a service account because we will explain using API key authentication.
Next, let's create an API key to be used for authentication. Select "Create Credentials" from "Credentials" in "API Manager". Then, the API key is displayed, so select it.
Make a note of the API key as it will complete the creation. You can close it after making a note, but make sure that the ** API key is never leaked to others. </ font> **
Please enable it in the same way as the Cloud Vision API. You don't have to create a project.
The contents of this hands-on are summarized in three articles.
Recommended Posts