gas-gocr2notion
Google Drive で OCR を行い、結果を Notion データベースへ送信する Google Apps Script ライブラリー。
AI Summary
gas-gocr2notion
GAS library for OCR on Google Drive files and sending to Notion DB.
Target Users
GAS developers wanting to OCR scanned files in Drive and auto-send to Notion DB.
Problems Solved
Need to OCR PDFs/images in Drive and automatically send results to Notion database.
Script ID
- In GAS Editor: Click "Libraries +" → Paste into "Script ID" field → Click "Look up"
- "gas-gocr2notion" will appear in the search results
- Select the latest version (highest number) from "Version" dropdown
- Click "Add"
Tags
Main Features
1
Easy Setup
Add library via script ID in Apps Script editor without download.
2
Flexible OCR Options
Configure scan/OCR folders, language, tags, and file removal per option.
3
Trigger Support
Use send() to start OCR from Google Drive change notifications.
Examples
Main Functions
| Function | Description |
|---|---|
| GocrToNotion.ocr | Executes OCR and sends to Notion |
| GocrToNotion.send | Starts OCR from Drive notifications |
Examples
Basic OCR Execution
/**
* 基本OCR実行
* ・APIキー/IDs設定: const apiKey = 'notion_api_key'; const database_id = 'database_id'; const folder_id = 'folder_id';
* ・OCRオプション指定: const opts = { database_id, ocrOpts: [{ scanFolderId: folder_id, ocrFolderId: folder_id, ocrLanguage: 'ja', tags: [], removeOcrFile: true }] };
* ・OCR処理実行: GocrToNotion.ocr(apiKey, opts);
*/
function myFunction() {
const apiKey = 'notion_api_key';
const database_id = 'database_id';
const folder_id = 'folder_id';
const opts = {
database_id,
ocrOpts: [
{
scanFolderId: folder_id,
ocrFolderId: folder_id,
ocrLanguage: 'ja',
tags: [],
removeOcrFile: true
}
]
};
GocrToNotion.ocr(apiKey, opts);
}
