Google_Apps_Scriptとは? わかりやすく解説

Weblio 辞書 > 辞書・百科事典 > デジタル大辞泉 > Google_Apps_Scriptの意味・解説 

グーグルアップス‐スクリプト【Google Apps Script】


ジー‐エー‐エス【GAS】

読み方:じーえーえす

《Google Apps Script》⇒グーグルアップススクリプト


Google Apps Script

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2024/07/30 08:32 UTC 版)

Google Apps Script
開発元 Google
プラットフォーム InstagramYouTubeGmailカレンダーChatドライブドキュメントスプレッドシートプレゼンテーションKeepサイト、Vault
種別 マクロ言語およびクラウドコンピューティング
公式サイト 公式ウェブサイト
影響を受けた言語 JavaScript
テンプレートを表示
Apps Script
開発元 Google
初版 2009年8月19日 (14年前) (2009-08-19)[1]
プログラミング
言語
JavaScript
種別 Webアプリケーションフレームワーク、スクリプトフレームワーク
公式サイト script.google.com
テンプレートを表示

Google Apps Script(GAS、ガス[2])とは、Googleによって開発されたスクリプトプラットフォームである軽量のアプリケーション開発のためのGoogleのワークスペースプラットフォーム。 主にGoogleのサービスを自動化するスクリプト言語である。JavaScriptがもとになっているため汎用性が高く、開発環境はGoogle Chromeだけでいいのでプログラミング初心者が始めやすい言語の1つである。Google Apps Scriptは当初、Mike HarmがGoogleスプレッドシートの開発者として働いていたときに、サイドプロジェクトとして開発された[3]。Google Apps Scriptは、2009年5月に、GoogleドキュメントのプロダクトマネージャーであったJonathanRochelleによってベータテストプログラムが発表されたときに初めて公開された[4]。 その後、2009年8月にGoogle AppsScriptがすべてのGoogleAppsPremierおよびEducationEditionのお客様に利用可能になる[5]。 これはJavaScript1.6に基づいているが、1.7と1.8の一部、およびECMAScript 5APIのサブセットも含まれている [6]

2020年3月、Googleは従来の Rhino JavaScript インタープリタに加えて V8 Rhino JavaScript インタープリタの提供を開始し、ECMAScript6以降の機能にも対応した[7]

Apps Scriptプロジェクトは、 Googleのインフラストラクチャで、サーバー側で実行される。 Googleによると、Apps Scriptは、「Google製品とサードパーティサービス全体のタスクを自動化する簡単な方法を提供します」[8]。 Apps Scriptは、 Googleドキュメント、スプレッドシート、スライドのアドオンを強化するツールでもある[9]

概要

Googleスプレッドシートで主に使われるが、それ以外でも利用ができる。非常に適応範囲が広いので、例えば、SNSに返信が届いた場合Gmailに届ける、Gmailで期限の近いタスクを自分のSlackで表示する等のこともできる。

function doGet(e) {  
  var searchTerm = 'Script Tools'
  var ui = XmlService.createDocument(XmlService.createElement('html')).setDocType(XmlService.createDocType('html'))
  var body = XmlService.createElement('body')  
  body = buildTree(body, searchTerm);
  ui.getRootElement().addContent(body)
  return HtmlService.createHtmlOutput(XmlService.getRawFormat().format(ui))
}


function buildTree(node, searchTerm) {
  var ul = XmlService.createElement('ul').addContent(XmlService.createElement('p').addContent(XmlService.createText(searchTerm))); 
  // Use of the Apps Script DriveApp Service to retrieve the collections.  
  var folders = DriveApp.getFoldersByName(searchTerm).next().getFolders()
  while (folders.hasNext()){    
    var thisFolder = folders.next();   
    var li = XmlService.createElement('li');   
    var resp = buildTree(li, thisFolder.getName())            
    ul.addContent(li);
  }

  var files =  DriveApp.getFoldersByName(searchTerm).next().getFiles()   
  while (files.hasNext()) {    
    var thisFile = files.next()    
    if (thisFile.getMimeType() === "application/vnd.google-apps.document") {
      urlBase = "https://docs.google.com/document/edit?id=";
      iconHTML = "https://drive-thirdparty.googleusercontent.com/32/type/application/vnd.google-apps.document";
    }    
    else if (thisFile.getMimeType() === "application/vnd.google-apps.spreadsheet") {      
      urlBase = "https://spreadsheets.google.com/ccc?key=";
      iconHTML = "https://drive-thirdparty.googleusercontent.com/32/type/application/vnd.google-apps.spreadsheet";
    }
    else if (thisFile.getMimeType() === "application/vnd.google-apps.script") {      
      urlBase = "https://docs.google.com/fileview?id=";
      iconHTML = "https://drive-thirdparty.googleusercontent.com/32/type/application/vnd.google-apps.script";
    }
    else if (thisFile.getMimeType() === "application/vnd.google-apps.presentation") {       
      urlBase = "https://docs.google.com/present/edit?id=";
      iconHTML = "https://drive-thirdparty.googleusercontent.com/32/type/application/vnd.google-apps.presentation";
    }
    else if (thisFile.getMimeType() === "application/vnd.google-apps.drawing") {       
      urlBase = "https://docs.google.com/drawings/edit?id=";
      iconHTML = "https://drive-thirdparty.googleusercontent.com/32/type/application/vnd.google-apps.drawing";       
    }
    else {
      urlBase = "https://docs.google.com/fileview?id=";
      iconHTML = "https://drive-thirdparty.googleusercontent.com/32/type/application/application/vnd.google-apps.unknown";    
    }    
    
    var li = XmlService.createElement('li');     
    var image = XmlService.createElement('img').setAttribute('src', iconHTML);    
    var fileLabel =  XmlService.createElement('a').setAttribute('href', urlBase + thisFile.getId())
                      .setAttribute('target', '_blank').addContent(XmlService.createText(thisFile.getName()))
    var fileLabelPanel = XmlService.createElement('div').setAttribute('style', 'display:flex;flex-direction: row;')
    fileLabelPanel.addContent(image)
    fileLabelPanel.addContent(fileLabel)    
    li.addContent(fileLabelPanel)
    ul.addContent(li)
  }    
  node.addContent(ul)
  return node;   
}

アドオン

2014年3月、Googleはドキュメントとスプレッドシートへのアドオンを導入。まもなくフォームにも導入された。アドオンを使用することで、メールマージやワークフロー、ダイアグラムビルダーをドキュメントエディタに追加することが可能になった。このアドオンらは全てApps Scriptで構築されているか、あるいはそれを使用してUIを表示し、タスクを外部バックエンドに依存させることで形成されている。例えばメールチンプは、メールチンプのプラットフォームと通信し、メールを送信するためのドキュメント用アドオンを使用している。

これが登場する前は、スクリプトギャラリーというものが存在し、そこでスクリプトを公開することができた。これを通じインストールすると、Apps Scriptのコードのコピーが自身のスプレッドシートに入るようになっていた。アドオンでは、エンドユーザーにソースコードを公開することはされず、全員が最新バージョンを使用することができる。

アドオンリリースの一環として、開発者がエディタに統合しやすくなるよう、ガイドとCSSを導入している[10]。また、それぞれのアドオンは正式公開前にGoogleによってレビューされるので、Google社員からのアドバイスを受けることができる。広告をアドオンに掲載することは原則不可能だが、マネタイズで利益を得ることは可能とされる[11]

関連項目

参考文献

  1. ^ Meyer, David (2009年8月20日). “Google Apps Script gets green light”. CNet. http://news.cnet.com/8301-1001_3-10314002-92.html 2011年3月26日閲覧。 
  2. ^ Google Apps Script(GAS)を解説!初心者でも分かる使い方とは”. MarkeTRUNK. 2023年6月1日閲覧。
  3. ^ Koleda (2019年8月21日). “Celebrating 10 years of Apps Script: looking back on how it started”. Google Cloud Blog. 2019年8月22日閲覧。
  4. ^ Rochelle (2009年5月27日). “Old tool, new tricks”. Google Cloud Blog. 2019年8月22日閲覧。
  5. ^ Levey (2009年8月19日). “Google Apps Script Launched to Google Apps Premier and Education”. Google Apps Script. 2019年8月22日閲覧。
  6. ^ Kienle, Holger (May–June 2010). “It's About Time to Take JavaScript (More) Seriously”. IEEE Software 27 (3): 60–62. doi:10.1109/MS.2010.76. http://www.computer.org/portal/web/csdl/doi/10.1109/MS.2010.76 2011年3月25日閲覧。. 
  7. ^ Alexandrina Garcia-Verdin (2020年3月17日). “Data processing just got easier with Apps Script’s new V8 runtime”. Google Cloud Blog. 2021年7月4日閲覧。
  8. ^ Google Apps Script
  9. ^ Bring a little something extra to Docs and Sheets with add-ons
  10. ^ エディタ アドオンの UI スタイルガイド”. Google Developers (2022年8月17日). 2022年11月6日閲覧。
  11. ^ I've started a little experiment...”. Google (2014年9月21日). 2014年12月24日時点のオリジナルよりアーカイブ。2022年11月6日閲覧。

外部リンク


「Google Apps Script」の例文・使い方・用例・文例

Weblio日本語例文用例辞書はプログラムで機械的に例文を生成しているため、不適切な項目が含まれていることもあります。ご了承くださいませ。


英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Google_Apps_Script」の関連用語

Google_Apps_Scriptのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Google_Apps_Scriptのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
デジタル大辞泉デジタル大辞泉
(C)Shogakukan Inc.
株式会社 小学館
ウィキペディアウィキペディア
All text is available under the terms of the GNU Free Documentation License.
この記事は、ウィキペディアのGoogle Apps Script (改訂履歴)の記事を複製、再配布したものにあたり、GNU Free Documentation Licenseというライセンスの下で提供されています。 Weblio辞書に掲載されているウィキペディアの記事も、全てGNU Free Documentation Licenseの元に提供されております。
Tanaka Corpusのコンテンツは、特に明示されている場合を除いて、次のライセンスに従います:
 Creative Commons Attribution (CC-BY) 2.0 France.
この対訳データはCreative Commons Attribution 3.0 Unportedでライセンスされています。
浜島書店 Catch a Wave
Copyright © 1995-2025 Hamajima Shoten, Publishers. All rights reserved.
株式会社ベネッセコーポレーション株式会社ベネッセコーポレーション
Copyright © Benesse Holdings, Inc. All rights reserved.
研究社研究社
Copyright (c) 1995-2025 Kenkyusha Co., Ltd. All rights reserved.
日本語WordNet日本語WordNet
日本語ワードネット1.1版 (C) 情報通信研究機構, 2009-2010 License All rights reserved.
WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. License
日外アソシエーツ株式会社日外アソシエーツ株式会社
Copyright (C) 1994- Nichigai Associates, Inc., All rights reserved.
「斎藤和英大辞典」斎藤秀三郎著、日外アソシエーツ辞書編集部編
EDRDGEDRDG
This page uses the JMdict dictionary files. These files are the property of the Electronic Dictionary Research and Development Group, and are used in conformance with the Group's licence.

©2025 GRAS Group, Inc.RSS