[研究]Google Apps Script 核心 Service(常用模組)
2026-10-07
內建 Google 服務
https://developers.google.com/apps-script/guides/services?utm_source=chatgpt.com&hl=zh-tw
| Service | 主要用途 | 常見操作 |
|---|---|---|
| SpreadsheetApp | Google 試算表 | 讀寫儲存格、工作表、格式 |
| DocumentApp | Google 文件 | 建立/修改文件、段落、表格 |
| FormApp | Google 表單 | 建立表單、題目、取得回覆 |
| DriveApp | Google Drive | 檔案、資料夾、搜尋、搬移 |
| GmailApp | Gmail | 寄信、搜尋、讀取郵件 |
| CalendarApp | Google 日曆 | 建立/修改行事曆事件 |
| ContactsApp | Google 聯絡人 | 聯絡人資料操作 |
| SlidesApp | Google 簡報 | 建立/修改簡報、投影片 |
| UrlFetchApp | HTTP/REST API | 呼叫外部網站、API |
| Utilities | 通用工具 | 日期、編碼、JSON、Blob、Sleep |
| PropertiesService | 儲存設定值 | API Key、系統設定、使用者設定 |
| CacheService | 暫存資料 | 暫存 API 回傳、降低重複查詢 |
| LockService | 鎖定/同步 | 避免多人同時執行造成資料衝突 |
| ScriptApp | Script 本身 | Trigger、執行資訊、授權 |
| Session | 使用者/執行環境 | 使用者 Email、時區 |
| HtmlService | Web UI | HTML 網頁、Web App 前端 |
| ContentService | HTTP 回應 | Web App 回傳 JSON / Text |
| LanguageApp | 翻譯 | Google Translate |
| MailApp | 寄信 | 發送 Email |
| Charts | 圖表 | 建立圖表物件 |
| Jdbc | 資料庫 | JDBC 連接 MySQL、SQL Server 等 |
⭐ 最值得先學的 10 個
- SpreadsheetApp
- DriveApp
- GmailApp
- CalendarApp
- DocumentApp
- FormApp
- UrlFetchApp
- Utilities
- PropertiesService
- ScriptApp
|
例如:操作 Google Sheet
|
例如:逐行讀取 Google Sheet
|
(完)
沒有留言:
張貼留言