{"id":2923,"date":"2021-02-26T20:34:28","date_gmt":"2021-02-26T11:34:28","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=2923"},"modified":"2021-02-26T20:34:48","modified_gmt":"2021-02-26T11:34:48","slug":"post-2923","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=2923","title":{"rendered":"GAS\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9(Google\u30a2\u30ab\u30a6\u30f3\u30c8)\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Google Apps Script(GAS)\u3067\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u304c\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5834\u5408\u3001\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u305f\u3044\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001GAS\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306eGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u540d(\u30e1\u30a2\u30c9)\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h2>\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u3067GAS\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u30b1\u30fc\u30b9<\/h2>\n<p>Google Apps Script(GAS)\u3067\u7528\u610f\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u4f5c\u6210\u3057\u305f\u30aa\u30fc\u30ca\u30fc\u4ee5\u5916\u306b\u3082\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u3082\u5b9f\u884c\u3059\u308b\u30b1\u30fc\u30b9\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u7279\u306bGoogle\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u3065\u304f\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5834\u5408\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u4e0a\u306b\u30dc\u30bf\u30f3\u3092\u914d\u7f6e\u3057\u3066\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u5229\u7528\u8005\u304c\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"xzKcJfXiG5\"><p><a href=\"https:\/\/auto-worker.com\/blog\/?p=1346\">\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u4e0a\u306e\u56f3\u5f62\u63cf\u753b\u3057\u305f\u30dc\u30bf\u30f3\u3067Google Apps Script(GAS)\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u4e0a\u306e\u56f3\u5f62\u63cf\u753b\u3057\u305f\u30dc\u30bf\u30f3\u3067Google Apps Script(GAS)\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5&#8221; &#8212; AutoWorker\u301cGoogle Apps Script(GAS)\u3068Sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\" src=\"https:\/\/auto-worker.com\/blog\/?p=1346&#038;embed=true#?secret=VMUGymAKAG#?secret=xzKcJfXiG5\" data-secret=\"xzKcJfXiG5\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30e1\u30ea\u30c3\u30c8\u306f\u3001Google\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u3042\u308c\u3070\u3001\u6a29\u9650\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306f\u8ab0\u3067\u3082\u5b9f\u884c\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<h2>\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u5b9b\u306b\u30e1\u30fc\u30eb\u3092\u9001\u308a\u305f\u3044<\/h2>\n<p>\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u304c\u5b9f\u884c\u3059\u308bGoogle Apps Script(GAS)\u3067\u306f\u3001\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u5b9b\u306b\u30e1\u30fc\u30eb\u3092\u9001\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u304c\u6c42\u3081\u3089\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>GAS\u3067\u30e1\u30fc\u30eb\u3092\u9001\u308b\u5834\u5408\u3001\u4e00\u822c\u7684\u306e\u3088\u3046\u306a\u5f62\u3067\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3001\u5b9b\u5148\u3068\u3057\u3066\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u5909\u6570\u3067\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5b9a\u7fa9<\/li>\n<li>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u30bb\u30eb\u304b\u3089\u8aad\u307f\u8fbc\u3080<\/li>\n<\/ul>\n<p>\u3057\u304b\u3057\u3001\u4e0a\u8a18\u306e\u3084\u308a\u65b9\u3067\u306f\u3001\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u3054\u3068\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7528\u610f\u3057\u305f\u308a\u3001\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u3068\u8aad\u307f\u8fbc\u3080\u30bb\u30eb\u3092\u9023\u52d5\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u306f\u3001GAS\u306b\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306eGoogle\u30a2\u30ab\u30a6\u30f3\u30c8ID\u3001\u3059\u306a\u308f\u3061\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>GAS\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\u8005\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/h2>\n<p>Google Apps Script(GAS)\u3067\u3001\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3068\u3057\u3066\u3001GAS\u72ec\u81ea\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong><em>Session.getActiveUser().getUserLoginId()<\/em><\/strong><\/p>\n<p>Session.getActiveUser().getUserLoginId()\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c\u3057\u305f\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30e6\u30fc\u30b6\u30fc\u306eGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u306eID\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>Google\u30a2\u30ab\u30a6\u30f3\u30c8\u306eID\u3068\u3044\u3046\u306e\u306fGmail\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3060\u3063\u305f\u308a\u3001\u767b\u9332\u3057\u305f\u4f1a\u793e\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001Google\u30a2\u30ab\u30a6\u30f3\u30c8\u306eID\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3067\u3001\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u203bSession.getActiveUser().getEmail()\u3067\u3082\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u53d6\u5f97\u304c\u53ef\u80fd\u3067\u3059\u3002<\/strong><\/p>\n<h2>\u5b9f\u884c\u8005\u306e\u30e1\u30a2\u30c9\u3092\u53d6\u5f97\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n<p>\u5b9f\u969b\u306b\u3001\u300cSession.getActiveUser().getUserLoginId()\u300d\u30e1\u30bd\u30c3\u30c9\u3092\u6d3b\u7528\u3057\u3001GAS\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3001\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308bGAS\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p><code>function getExecuteUserAddress() {<br \/>\nlet mailAddress = Session.getActiveUser().getUserLoginId();<br \/>\nBrowser.msgBox(\"\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\uff1a\"+mailAddress);<br \/>\n}<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2926\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001.jpg\" alt=\"Google Apps Script(GAS)\u3092\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9(Gmail\u30a2\u30c9\u30ec\u30b9)\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\" width=\"1200\" height=\"626\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001-300x157.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001-768x401.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001-1024x534.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001-530x276.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001-565x295.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001-710x370.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/02\/20210226_auto_001-725x378.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u5b9f\u884c\u30ed\u30b0\u306e\u3088\u3046\u306b\u3001Google\u30a2\u30ab\u30a6\u30f3\u30c8\u306eID\u3067\u3042\u308bGmail\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u53d6\u5f97\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001Session.getActiveUser().getUserLoginId()\u3067\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u53d6\u5f97\u3067\u304d\u308c\u3070\u3001\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u5b9b\u306b\u500b\u5225\u306b\u30e1\u30fc\u30eb\u3092\u9001\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n<p>\u4eca\u56de\u3001Google Apps Script(GAS)\u3067\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>GAS\u306b\u306f\u300cSession.getActiveUser().getUserLoginId()\u300d\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u3001Google\u30a2\u30ab\u30a6\u30f3\u30c8\u306eID(=\u30e1\u30a2\u30c9)\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3067\u3001\u5b9f\u884c\u30e6\u30fc\u30b6\u30fc\u5b9b\u306bGAS\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u51e6\u7406\u3057\u305f\u7d50\u679c\u3092\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u3068\u3044\u3063\u305f\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u5b9b\u5148\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5909\u6570\u3067\u5b9a\u7fa9\u3057\u305f\u308a\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u30bb\u30eb\u304b\u3089\u8aad\u307f\u53d6\u308b\u3088\u308a\u3082\u67d4\u8edf\u306a\u30b3\u30fc\u30c9\u306b\u306a\u308b\u306e\u3067\u3001\u305c\u3072\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Apps Script(GAS)\u3067\u8907\u6570\u30e6\u30fc\u30b6\u30fc\u304c\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5834\u5408\u3001\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3057\u305f\u3044\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u3053\u3067\u3001GAS\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306eGoogle\u30a2\u30ab\u30a6\u30f3\u30c8\u540d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2926,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[14,588,587],"class_list":["post-2923","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gas","tag-gas","tag-google","tag-587"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2923"}],"version-history":[{"count":6,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2923\/revisions"}],"predecessor-version":[{"id":2934,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2923\/revisions\/2934"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/2926"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}