Umitake AI OCR for Kintone — User Manual
Table of Contents
- Overview
- Installation
- Getting API Keys
- Plugin Configuration
- Using Pattern A (Record-level OCR)
- Using Pattern B (Table Row-level OCR)
- AI Lookup Search
- Notes and Limitations
- Troubleshooting
Overview
The AI OCR Plugin reads PDF and image files (JPG, PNG, WebP) using AI and automatically fills kintone record fields with the extracted values.
Key features:
- Extract field values from invoices, forms, receipts, and any other document
- Support for four AI providers: Claude (Anthropic), OpenAI (GPT), Azure OpenAI, and Google Gemini
- Two operating modes:
- Pattern A — Record-level OCR with a side-by-side review screen before applying values
- Pattern B — Table row-level OCR with a per-row review screen
- AI Lookup Search — AI automatically selects the best matching master record for lookup fields
- Automatically save the OCR source file to an attachment field
Installation
- Open the kintone admin console (gear icon in the top right)
- Click Plugins
- Click Import Plugin
- Select and upload
kintone-ai-ocr.zip - After uploading, open the target app's settings
- From the Plugins tab, add "AI OCR"
- Click Settings to open the plugin configuration screen
Getting API Keys
To use the AI OCR Plugin, you need an API key from your chosen AI provider. The API key is entered in the plugin settings and is stored encrypted in kintone's plugin configuration.
Anthropic (Claude)
Claude provides native PDF support with high accuracy, especially for scanned documents.
- Go to https://platform.claude.com/ and sign in (or create an account)
- From the left menu, click API Keys
- Click Create Key, enter a name, and click Create Key
- Copy the key that starts with
sk-ant-— it is shown only once - Paste the key into the API Key field in the plugin settings
Note: Anthropic charges based on token usage. You can check your usage and credits at https://platform.claude.com/settings/billing.
OpenAI (GPT)
- Go to https://platform.openai.com/ and sign in (or create an account)
- From the top-right menu, click your organization name → API keys
- Click Create new secret key, enter a name, and click Create secret key
- Copy the key that starts with
sk-— it is shown only once - Paste the key into the API Key field in the plugin settings
Note: PDFs are converted to images (300 DPI PNG) using PDF.js before being sent to the API. Digital PDFs are highly accurate, but scanned PDFs may have slightly reduced accuracy compared to Claude.
Azure OpenAI
Azure OpenAI requires an active Azure subscription and an approved Azure OpenAI resource.
Step 1 — Create an Azure OpenAI resource:
- Sign in to https://portal.azure.com/
- Search for Azure OpenAI and click Create
- Fill in subscription, resource group, region, and resource name, then click Create
Step 2 — Deploy a model:
- Open the created resource and click Go to Azure OpenAI Studio (or navigate to https://oai.azure.com/)
- Click Deployments → Create new deployment
- Select a model (e.g.,
gpt-4o) and enter a deployment name (e.g.,gpt-4o-deployment) - Note the deployment name — you will need it in the plugin settings
Step 3 — Get the API key and endpoint:
- In the Azure portal, open your Azure OpenAI resource
- Click Keys and Endpoint (under Resource Management)
- Copy KEY 1 (or KEY 2)
- Note the Resource Name from the endpoint URL (e.g.,
https://<resource-name>.openai.azure.com/)
Step 4 — Enter in plugin settings:
| Field | Value |
|---|---|
| AI Provider | Azure OpenAI |
| API Key | KEY 1 or KEY 2 |
| Azure Resource Name | Resource name from the endpoint URL |
| API Version | e.g., 2024-08-01-preview |
| Model (Deployment Name) | The deployment name you entered |
Google Gemini
Option A — Google AI Studio (simple, for personal use):
- Go to https://aistudio.google.com/ and sign in with a Google account
- Click Get API key → Create API key
- Copy the generated key
- Paste the key into the API Key field in the plugin settings
Option B — Google Cloud (for production / organization use):
- Sign in to https://console.cloud.google.com/
- Create or select a project
- Enable the Generative Language API (search for it in the API Library)
- Navigate to APIs & Services → Credentials → Create Credentials → API key
- Copy the generated key and paste it into the plugin settings
Plugin Configuration
Click Settings for "AI OCR" in your app's plugin settings to open the configuration screen.
License Key
If you have a license key, enter it in the License Key field and click Verify. A license is required to use this plugin.
AI Provider and Model
- Select your AI provider from the AI Provider dropdown
- For Anthropic, the available models are listed automatically
- For OpenAI and Gemini, click Load Models to fetch the available models from the API
- For Azure OpenAI, enter the Deployment Name directly (this is the name you chose when deploying the model in Azure OpenAI Studio)
- Additional Azure fields:
- Azure Resource Name — the resource name from your endpoint URL
- API Version — e.g.,
2024-08-01-preview
PDF support by provider:
| Provider | PDF handling | Notes |
|---|---|---|
| Claude (Anthropic) | Native | Highest accuracy for scanned documents |
| OpenAI (GPT) | Converted to images (PDF.js, 300 DPI PNG) | Slightly lower accuracy for scanned PDFs |
| Azure OpenAI | Converted to images (PDF.js, 300 DPI PNG) | Same as OpenAI |
| Gemini (Google) | Native (inline_data) | High accuracy |
Common Prompt
Enter general extraction instructions that apply to all OCR runs. This is sent to the AI every time OCR is executed.
Example:
Extract the following fields from the invoice. Return only the values explicitly written in the document. If a field is not found, return an empty string.
Pattern A — Record-level OCR
Enable Pattern A to add an OCR widget to a record's edit screen.
| Setting | Description |
|---|---|
| Space Element ID | The element ID of the Space field where the OCR widget will be displayed |
| Attachment Field (optional) | An attachment field to save the OCR source file to after the record is saved |
| File behavior on save | Append — keep existing files and add / Replace — overwrite |
| Additional Prompt Field (optional) | A multi-line text field whose value is sent to the AI as an extra prompt |
Additional Prompt Field — Usage Examples
The Additional Prompt Field lets you give the AI different OCR instructions on a per-record basis. The content of the specified multi-line text field is appended to the Common Prompt at OCR execution time.
Handling special document formats
Use it to describe per-document reading rules that differ from the norm:
This invoice shows tax-inclusive amounts only.
Calculate the pre-tax amount as: amount ÷ 1.1.
Extract only the product code in the format: 2 letters + 4 digits (e.g., AB-0123).
Providing hints for lookup matching
When the name on a document doesn't exactly match a kintone master record, combine this with AI Lookup Search to improve accuracy:
If the vendor name contains abbreviations like "Inc." or "Co.", match against the full
company name in the master.
Copying rules from a master record via Lookup
You can store OCR instructions in a "Document Type Master" kintone app and copy them into this field using a Lookup field. This lets you manage per-vendor or per-document-type rules centrally without requiring operators to type instructions each time.
| Document Type Master | OCR Instructions (copied to Additional Prompt) |
|---|---|
| Vendor A Invoice | Amounts are tax-inclusive. Part codes: 2 letters + 4 digits. |
| Vendor B Order | Split quantity and unit into separate fields. |
| Vendor C Receipt | Enter the addressee in the "Customer Name" field. |
Field Mappings
Maps OCR result keys to kintone fields.
| Column | Description |
|---|---|
| Kintone Field | The kintone field to fill (select from the dropdown) |
| OCR Result Key | The JSON key name the AI should output for this field |
Click + Add Field to add a row. Click × to remove.
Example: To extract "invoice number" into a kintone field with field code invoice_no:
| Kintone Field | OCR Result Key |
|---|---|
Invoice No. (invoice_no) | invoice_number |
The AI's system prompt instructs it to return JSON like { "invoice_number": "INV-001", ... }. The plugin maps invoice_number → invoice_no.
Table Mappings
Maps OCR result table rows to a kintone subtable field. Use this to populate line-item tables from invoices, etc.
| Setting | Description |
|---|---|
| Table Field | The kintone subtable field to fill |
| Column Mappings | Maps each subtable column to an OCR result key |
Multiple table mappings can be added for different subtables.
Pattern B — Table Row-level OCR
Enable Pattern B to replace a kintone subtable with a custom table that has an OCR button on each row.
| Setting | Description |
|---|---|
| Table Field Code | The kintone subtable field to replace with the OCR table |
| Space Element ID | The Space field where the custom OCR table will be displayed |
| Attachment Column (optional) | A FILE-type column in the subtable to save the OCR source file to |
| File behavior on save | Append — keep existing files and add / Replace — overwrite |
Column Mappings
| Column | Description |
|---|---|
| Column | The subtable column field (select from the dropdown) |
| OCR Result Key | The JSON key name the AI should output for this column |
Using Pattern A (Record-level OCR)
- Open a record in Edit mode
- The OCR widget is displayed in the Space field you configured
- Select a file: drag and drop a PDF or image onto the drop zone, or click to browse
- (Optional) Enter additional instructions in the Additional prompt text area
- Click Run OCR
- The plugin sends the file to the AI and displays the OCR Review modal when the result is ready
- In the review modal:
- The document preview is shown on the left (multi-page PDFs show page navigation arrows)
- The extracted field values are shown on the right — you can edit them before applying
- For table mappings, extracted rows are shown in a table section at the bottom
- Click Apply to Record to fill the kintone fields with the reviewed values
- Save the record normally — if an attachment field is configured, the source file is uploaded at this point
Using Pattern B (Table Row-level OCR)
- Open a record in Edit mode
- The custom OCR table is displayed in the Space field you configured
- Each row has an 📎 OCR button in the action column
- Click 📎 OCR on the row you want to fill
- A file browser opens — select a PDF or image
- The plugin runs OCR and displays the Row OCR Result modal
- Review and edit the extracted values, then click Apply to Row
- Repeat for each row as needed
- Use the + Add Row button to add new rows, or × to remove rows
- Save the record normally — attachment files are uploaded at save time
AI Lookup Search
When a field mapped to an OCR result key is a lookup field, you can enable AI Lookup Search to have the AI automatically select the best matching master record.
How it works
- Before running OCR, the plugin fetches all records from the lookup's source app and caches them
- After OCR extracts field values, the AI compares the OCR result against the candidate records
- The AI returns the key value of the best matching record
- The matched value is pre-filled in the review modal
Enabling AI Lookup Search
In Pattern A — Field Mappings:
When you select a kintone lookup field in the Kintone Field dropdown, an AI Lookup Search checkbox appears below the row. Check it to enable AI matching for that field.
In Pattern B — Column Mappings:
When you select a lookup column in the Column dropdown, an AI Lookup Search checkbox appears. Check it to enable.
Use case examples
- Vendor name: OCR reads "ABC Trading Co." from an invoice → AI searches the vendor master and fills in the correct vendor code
- Account code: OCR reads an expense description → AI selects the appropriate account code from the chart of accounts
- Product code: OCR reads a product name → AI matches it to the item master and fills in the item code
Note: AI Lookup Search makes additional API calls to the AI. If no good match is found, the raw OCR text is used instead.
Notes and Limitations
Supported file types
PDF, JPG, JPEG, PNG, WebP
API key security
API keys are stored in kintone's plugin configuration (server-side encrypted storage). They are never sent to any server other than the AI provider's API endpoint via kintone.proxy.
PDF accuracy
| Provider | Digital PDF | Scanned PDF |
|---|---|---|
| Claude (Anthropic) | Excellent | Excellent |
| OpenAI (GPT) | Excellent | Good (image conversion at 300 DPI) |
| Azure OpenAI | Excellent | Good (image conversion at 300 DPI) |
| Gemini (Google) | Excellent | Excellent |
For high-volume scanned document processing, Claude (Anthropic) is recommended.
Pattern A and Pattern B cannot share the same Space field
If both patterns are enabled, each must be assigned a different Space field. The plugin settings screen shows a warning if the same Space field is selected for both.
kintone subtable Space field limitation
kintone does not allow Space fields inside subtable rows. This is why Pattern B replaces the entire subtable with a custom table rendered in a separate Space field.
Display language
The OCR widget and plugin settings screen automatically display in Japanese or English based on the logged-in user's language setting (kintone.getLoginUser().language).
Troubleshooting
The OCR widget does not appear
Check:
- Plugin settings have been saved (did you click Save on the settings screen?)
- Pattern A (or B) is enabled in the plugin settings
- The Space field's Element ID in the kintone form settings matches the Space Element ID in the plugin settings
- The app settings have been saved and the app has been updated
OCR runs but fields are not filled
Check:
- The OCR Result Key in Field Mappings exactly matches the key name you used in the Common Prompt (the AI must output JSON with this exact key)
- The Kintone Field selected in the mapping is correct
- Click Apply to Record (or Apply to Row) in the review modal — values are not applied automatically
AI API error
Check:
- The API key is correct and has not expired
- The model selected in the plugin settings is available (some older models may be deprecated)
- For Azure OpenAI: the Resource Name, API Version, and Deployment Name are all correct
- Your AI account has sufficient credits/quota
License error
Check:
- The license key is entered in the plugin settings and has been verified
- The license has not expired
Lookup field is not recognized as a lookup (AI Lookup Search checkbox does not appear)
Check:
- The field selected in the mapping is actually a lookup field in the kintone form settings
- The app fields were loaded correctly (try refreshing the plugin settings screen)
For Pattern B: Changes in the OCR table are not reflected when saving
Check:
- Do not edit the original kintone subtable directly — always use the custom OCR table in the Space field
- If the original subtable is visible, contact your kintone administrator to verify the Space field placement
