[D3] Google Apps Script勉強会(再)

Embed Size (px)

Text of [D3] Google Apps Script勉強会(再)

  • Google Apps Script()

    GAS

  • GAS GoogleScript

    GmailGoogle DriveGoogle CalendarGoogle

    API

    JavaScript

    CloudIDE

  • Google

  • jsonhtml

    Mock API

  • GUI

    HTML

  • How To Start

  • STEP1: Google

  • Step2: Google Spread Sheet

    Google

  • STEP3:

    Spread Sheet

  • STEP4:

    "Hello World!"

  • STEP5:

  • var sheet = SpreadsheetApp.getActive();var cell = sheet.getRange("A1");cell.setValue("test");

  • Gmail

    GmailApp .sendEmail( "junpei.nishina@bizreach.co.jp" , "Test" , "test" , { from: "junpei.nishina@bizreach.co.jp", name: "GAS TEST" } );

  • Google

    var event = {"summary": "Event Title","start": {

    "dateTime": "2016-04-20T13:00+08:00"},"end": {

    "dateTime": "2016-04-20T18:00+08:00"}

    }

    Calendar.Events.insert({"calendarId": "","resource": event

    });

  • var form = FormApp.create("New Form");form.addCheckBoxItem();form.addMultipleChoiceItem();form.addPageBreakItem();form.addDateItem();form.addGridItem();

  • Google Translate

    var japanese = LanguageApp .translate('This is a pen', 'en', 'ja');

    Logger.log(japanese);

  • Google Map

    function doGet(event) { var map = Maps.newStaticMap() .setSize(600, 600) .setCenter(' 2-15-1');

    map.setMarkerStyle(Maps.StaticMap.MarkerSize.MID ,Maps.StaticMap.Color.RED, 'B'); map.addMarker(' 2-15-1');

    var app = UiApp.createApplication().setTitle(''); app.add(app.createImage(map.getMapUrl())); return app; }

  • Google URL Shortener()

    URL Shortener Developer ConsoleAPI

  • Google URL Shortener(URL)

    var url = UrlShortener.Url.insert({ longUrl: 'http://www.example.com'});

    Logger.log('Shortened URL is "%s".', url.id);

  • Google URL Shortener()

    var shortUrl = "https://goo.gl/4Vwqb2";var url = UrlShortener.Url.get(shortUrl, { projection: 'ANALYTICS_CLICKS'});

    Logger.log('The URL received %s clicks this week.' , url.analytics.week.shortUrlClicks);

  • (JavaScript)

    function showCustomDialog() { var html = HtmlService.createHtmlOutputFromFile('my_modal') .setSandboxMode(HtmlService.SandboxMode.IFRAME); SpreadsheetApp.getUi() .showModalDialog(html, ' ');}

    // function onButtonClick() { Logger.log("button clicked!");}

  • (HTML)

    GoogleAppsCSS

  • GAS

  • Youtube SpreadsheetApp

    YouTube API

    HTML ServiceGUI

  • CMS HTML ServiceHTML

    SpreadSheet

    URL ShortenerURL

    URL Shortener

  • Slack Bot aSlack

    ChatBotMap

    ChatBotMapURLSlack

  • Tips:

  • > >

  • (?)