Original materials and learning process
Keep GAS, Sheets and Gemini as the learning path; optional Python courses do not replace these exercises.
Security and quotas
Official sources checked: 2026-11-07. Recheck before deployment because quotas may change.
Security: the APIKEY worksheet is a historical example only. Never store secrets in Sheets. Store tokens, Channel Secret, and other API keys in server environment variables or a secret manager. GAS Script Properties separates configuration from code; it is not a vault. Project editors can retrieve these values, so do not broadly grant editor access.
The documented event fields of public GAS doPost(e) do not expose x-line-signature; pure GAS is not a reliable direct LINE signature-verification entry point. This is a limitation of the original direct-GAS learning architecture. Production use needs a separately evaluated signature-verifying ingress; another platform is not a prerequisite for this course.
- Apps Script: 6 minutes per execution, 30 simultaneous executions per user, and 1,000 per script. These are execution limits, not safe user counts or throughput guarantees.
- UrlFetch: 20,000 calls per day for consumer accounts and 100,000 for Google Workspace, per user; quotas reset 24 hours after the first request.
- Total trigger runtime, including time-driven triggers: 90 minutes per day for consumer accounts and 6 hours for Workspace. This is trigger usage, not an aggregate daily runtime limit for all web app requests.
- Google Sheets file limit: 20 million cells or 100MB, not 10 million cells. File capacity does not establish usable throughput or a safe user-count limit.
Batch reads and writes, use locks for shared writes, handle retries and duplicate records, and define retention periods with minimal personal data and restricted access. Measure latency, errors, and quota usage under load. Move high-concurrency, transactional, or fine-grained access-control workloads to a database.
官方來源 / Official sources (2026-11-07): Apps Script quotas · Properties Service · Web Apps event fields · LINE signature verification · Google Sheets file limits.
Role of Apps Script
The materials frame the system as a multi-module assistant: LINE handles message intake and delivery, Gemini handles interpretation and generation, Sheets provides memory, Drive stores files, and Apps Script supports workflows. The original exercises begin with GAS event handling and replies, then add Sheets logs and Gemini. Production security is a separate consideration.
How routing works
The original course starts with doPost(e) parsing a LINE event, then routes the message to a reply function. Add Sheets records before Gemini and Drive features, retesting the same input after each change.
Worksheets are part of the data architecture
Google Sheets is not just an attachment. In this course, it becomes a lightweight data layer: non-secret configuration, file logs, notes, state flags, and workflow traces are all structured there.
Prompts and intent extraction
The course emphasizes role-based prompting rather than generic text generation. A useful backend prompt should define tasks, constraints, required parameters, clarification behavior, and when structured output is required.
Logs, admin menus, and maintenance
The original materials also discuss admin-side menu control inside Google Sheets. That turns the bot into a maintainable service, which is why this site treats engineering maintenance as part of the learning outcome.
Plan usage before extending features
Checked 2026-11-07. Daily quotas are per user and reset 24 hours after the first request, not necessarily at midnight. Exceeding a limit raises an exception and stops execution. Product-specific LINE and Gemini limits also apply independently.
- One message can cause several URL Fetch calls: profile lookup, loading animation, Gemini and reply. Count each executed branch rather than equating one message with one call.
- Use: daily messages × measured calls per message, plus retries and scheduled jobs. This is an estimate, not a supported-user guarantee.
- A 6-minute execution limit does not mean users should wait six minutes. Trigger runtime (90 minutes/day for consumer accounts, 6 hours/day for Workspace) is not the daily runtime allowance for every web request.
- Use batched Sheet reads/writes, record failure categories without secrets, and stop/retry appropriately. Do not rotate accounts or keys to evade quotas.