自動化快速入門導覽課程
建立並執行簡單的自動化動作,建立 Google 文件並傳送文件連結給您。
目標
必要條件
如要使用這個範例,您必須具備下列先決條件:
- Google 帳戶 (Google Workspace 帳戶可能需要管理員核准)。
- 可連上網際網路的網路瀏覽器。
設定指令碼
如要建構自動化動作,請按照下列步驟操作:
- 如要開啟 Apps Script 編輯器,請前往
script.google.com
。如果這是您第一次使用 script.google.com
,請按一下「查看資訊主頁」。
- 按一下 [新專案]。
刪除指令碼編輯器中的任何程式碼,然後貼上下方的程式碼。
按一下「儲存」圖示
。
按一下「Untitled project」。
輸入指令碼名稱,然後按一下「重新命名」。
執行指令碼
如要執行指令碼,請按照下列步驟操作:
- 按一下「執行」。
出現提示時,請授權執行指令碼。如果 OAuth 同意畫面顯示「This app isn't verified」警告,請依序選取「Advanced」「Go to {Project Name} (unsafe)」(前往「{Project Name}」(不安全))。
指令碼執行完畢後,請前往 Gmail 收件匣查看電子郵件。
開啟電子郵件,然後點選連結,即可開啟您建立的文件。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-21 (世界標準時間)。
[null,null,["上次更新時間:2024-12-21 (世界標準時間)。"],[[["This script automates the creation of a Google Doc and emails you a link for access."],["You'll need a Google Account and web browser to use this automation script."],["The script involves pasting provided code into the Apps Script editor and running it after authorization."],["Upon successful execution, you'll receive an email containing the link to your newly created Google Doc."],["Explore further options to extend functionalities with Google Docs, Sheets, and Slides or learn basic JavaScript."]]],[]]