{"id":11922,"date":"2018-11-06T16:46:29","date_gmt":"2018-11-06T07:46:29","guid":{"rendered":"http:\/\/takuminasuno.com\/?p=11922"},"modified":"2018-11-06T17:40:08","modified_gmt":"2018-11-06T08:40:08","slug":"20181106_gas_ja","status":"publish","type":"post","link":"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja","title":{"rendered":"\u3010GAS\u00d7LINE\u3067\u5bb6\u4e8b\u80b2\u5150\u3011Google Apps Script\u3092\u4f7f\u3063\u3066Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3068\u304bGoogle\u30bf\u30b9\u30af\u3068\u304b\u5929\u6c17\u4e88\u5831\u306e\u60c5\u5831\u3092LINE\u306b\u5b9a\u671f\u9001\u4fe1\u3057\u3066\u307f\u305f"},"content":{"rendered":"<p>&#23064;&#12398;&#32946;&#20816;&#12434;&#12365;&#12387;&#12363;&#12369;&#12395;&#22827;&#23142;&#12398;&#20849;&#21516;&#29983;&#27963;&#26178;&#38291;&#12364;&#28608;&#22679;&#12375;&#12414;&#12375;&#12383;&#12290;&#24773;&#22577;&#20849;&#26377;&#12434;&#24505;&#24213;&#12377;&#12427;&#12383;&#12417;&#12395;&#21508;&#31278;&#12463;&#12521;&#12454;&#12489;&#12450;&#12503;&#12522;&#12434;&#39366;&#20351;&#12375;&#22987;&#12417;&#12383;&#12431;&#12369;&#12391;&#12377;&#12364;&#12289;&#32622;&#12365;&#22580;&#25152;&#12364;&#12496;&#12521;&#12496;&#12521;&#12394;&#12398;&#12391;&#12289;&#12420;&#12387;&#12401;&#12426;&#33394;&#12293;&#12392;&#28431;&#12428;&#12364;&#20986;&#12414;&#12377;&#12290;<p>&#20581;&#12420;&#12363;&#12394;&#12427;&#23478;&#20107;&#32946;&#20816;&#29983;&#27963;&#12398;&#12383;&#12417;&#12395;&#12399;&#12289;&#12414;&#12392;&#12414;&#12387;&#12383;&#24418;&#12391;&#12398;&#23450;&#26399;&#22577;&#21578;&#12364;&#12354;&#12427;&#12392;&#27005;&#12394;&#12398;&#12391;&#12289;&#26126;&#26085;&#12398;&#20104;&#23450;&#12392;&#12363;&#22825;&#27671;&#20104;&#22577;&#12392;&#12363;&#27531;&#12479;&#12473;&#12463;&#12392;&#12363;&#12434;&#12289;Google Apps Script&#65288;GAS&#65289;&#12434;&#20351;&#12387;&#12390;&#12469;&#12540;&#12496;&#12540;&#12524;&#12473;&#12363;&#12388;&#20986;&#37549;&#12476;&#12525;&#12391;LINE&#12395;&#23450;&#26399;&#36865;&#20449;&#12373;&#12379;&#12427;&#20181;&#32068;&#12415;&#12434;&#20316;&#12387;&#12390;&#12415;&#12414;&#12375;&#12383;&#12290;<\/p><p>&nbsp;<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-11915 size-full\" src=\"http:\/\/takuminasuno.com\/wp-content\/uploads\/2018\/10\/gas-line.png\" alt=\"\" width=\"945\" height=\"630\"><a href=\"http:\/\/takuminasuno.com\/wp-content\/uploads\/2018\/11\/gas-line.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11932\" src=\"http:\/\/takuminasuno.com\/wp-content\/uploads\/2018\/11\/gas-line.png\" alt=\"\" width=\"945\" height=\"630\"><\/a><\/p><p>&nbsp;<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_68_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\u76ee\u6b21<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja\/#1%E3%82%A2%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88%E3%81%AE%E5%8F%96%E5%BE%97\" title=\"1.&#12450;&#12459;&#12454;&#12531;&#12488;&#12398;&#21462;&#24471;\">1.&#12450;&#12459;&#12454;&#12531;&#12488;&#12398;&#21462;&#24471;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja\/#2LINE%E3%82%A2%E3%83%97%E3%83%AA%E3%81%A7%E3%83%95%E3%82%A9%E3%83%AD%E3%83%BC\" title=\"2.LINE&#12450;&#12503;&#12522;&#12391;&#12501;&#12457;&#12525;&#12540;\">2.LINE&#12450;&#12503;&#12522;&#12391;&#12501;&#12457;&#12525;&#12540;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja\/#3GAS%E3%81%AE%E7%AB%8B%E3%81%A1%E4%B8%8A%E3%81%92\" title=\"3.GAS&#12398;&#31435;&#12385;&#19978;&#12370;\">3.GAS&#12398;&#31435;&#12385;&#19978;&#12370;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja\/#4Messaging_API%E3%81%AE%E8%A8%AD%E5%AE%9A\" title=\"4.Messaging API&#12398;&#35373;&#23450;\">4.Messaging API&#12398;&#35373;&#23450;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja\/#5%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BCID%E3%81%AE%E5%8F%96%E5%BE%97\" title=\"5.&#12518;&#12540;&#12470;&#12540;ID&#12398;&#21462;&#24471;\">5.&#12518;&#12540;&#12470;&#12540;ID&#12398;&#21462;&#24471;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja\/#6%E3%83%97%E3%83%83%E3%82%B7%E3%83%A5%E9%80%9A%E7%9F%A5%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%AE%E4%BD%9C%E6%88%90\" title=\"6.&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12473;&#12463;&#12522;&#12503;&#12488;&#12398;&#20316;&#25104;\">6.&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12473;&#12463;&#12522;&#12503;&#12488;&#12398;&#20316;&#25104;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/takuminasuno.com\/ja\/20181106_gas_ja\/#7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E3%81%AE%E3%82%88%E3%82%82%E3%82%84%E3%81%BE%E8%A9%B1\" title=\"7.&#12467;&#12531;&#12486;&#12531;&#12484;&#12398;&#12424;&#12418;&#12420;&#12414;&#35441;\">7.&#12467;&#12531;&#12486;&#12531;&#12484;&#12398;&#12424;&#12418;&#12420;&#12414;&#35441;<\/a><\/li><\/ul><\/nav><\/div>\n<h4><span class=\"ez-toc-section\" id=\"1%E3%82%A2%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88%E3%81%AE%E5%8F%96%E5%BE%97\"><\/span>1.&#12450;&#12459;&#12454;&#12531;&#12488;&#12398;&#21462;&#24471;<span class=\"ez-toc-section-end\"><\/span><\/h4><p><a href=\"https:\/\/manual.linestep.net\/account\/s1\" target=\"_blank\" rel=\"noopener\">&#20844;&#24335;&#12510;&#12491;&#12517;&#12450;&#12523;<\/a>&#12434;&#21442;&#29031;&#12375;&#12394;&#12364;&#12425;&#12289;<a href=\"https:\/\/developers.line.me\/ja\/services\/messaging-api\/\" target=\"_blank\" rel=\"noopener\">LINE Developers<\/a>&#12363;&#12425;Messaging API&#12398;&#26032;&#35215;&#12481;&#12515;&#12493;&#12523;&#12434;&#12302;Developer Trial&#12503;&#12521;&#12531;&#12303;&#12395;&#12390;&#20316;&#25104;&#12375;&#12414;&#12377;&#12290;&#12393;&#12358;&#12379;&#22827;&#23142;2&#20154;&#12395;&#12289;&#22810;&#12367;&#12390;&#19968;&#26085;&#25968;&#22238;&#12398;&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12434;&#36865;&#12427;&#12384;&#12369;&#12394;&#12398;&#12391;&#12289;&#12371;&#12398;&#12503;&#12521;&#12531;&#12391;&#20840;&#12367;&#21839;&#38988;&#12394;&#12356;&#12391;&#12377;&#12290;<\/p><p><span style=\"color: #ff0000;\">&#27880;&#24847;&#9312;&#65306;LINE@&#12450;&#12459;&#12454;&#12531;&#12488;&#12398;&#12501;&#12522;&#12540;&#12503;&#12521;&#12531;&#12392;&#12399;&#21029;&#12394;&#12398;&#12391;&#35201;&#27880;&#24847;&#12290;<\/span><\/p><p><span style=\"color: #ff0000;\">&#27880;&#24847;&#9313;&#65306;&#21021;&#12417;&#12390;&#12525;&#12464;&#12452;&#12531;&#12377;&#12427;&#22580;&#21512;&#12399;&#12473;&#12510;&#12507;&#12398;LINE&#12450;&#12503;&#12522;&#12391;&#35469;&#35388;&#12364;&#24517;&#35201;&#12391;&#12377;&#12290;<\/span><\/p><p><span style=\"color: #ff0000;\">&#27880;&#24847;&#9314;&#65306;&#12473;&#12510;&#12507;&#12398;LINE&#12450;&#12503;&#12522;&#12391;&#12450;&#12459;&#12454;&#12531;&#12488;&#12398;&#12525;&#12464;&#12452;&#12531;&#35377;&#21487;&#12434;&#12375;&#12390;&#12356;&#12394;&#12356;&#12392;&#12289;&#12525;&#12464;&#12452;&#12531;&#12391;&#12365;&#12414;&#12379;&#12435;&#12290;<\/span><\/p><p>&nbsp;<\/p><h4><span class=\"ez-toc-section\" id=\"2LINE%E3%82%A2%E3%83%97%E3%83%AA%E3%81%A7%E3%83%95%E3%82%A9%E3%83%AD%E3%83%BC\"><\/span>2.LINE&#12450;&#12503;&#12522;&#12391;&#12501;&#12457;&#12525;&#12540;<span class=\"ez-toc-section-end\"><\/span><\/h4><p>&#20316;&#25104;&#12375;&#12383;&#26032;&#35215;&#12481;&#12515;&#12493;&#12523;&#12418;&#12392;&#12356;LINE&#12508;&#12483;&#12488;&#12434;&#12289;&#12373;&#12387;&#12381;&#12367;&#12473;&#12510;&#12507;&#12398;LINE&#12450;&#12503;&#12522;&#12391;&#12501;&#12457;&#12525;&#12540;&#12375;&#12414;&#12377;&#12290;<a href=\"https:\/\/developers.line.me\/console\/profile\/\" target=\"_blank\" rel=\"noopener\">LINE Developers&#12398;&#12467;&#12531;&#12477;&#12540;&#12523;&#30011;&#38754;<\/a>&#12434;&#38283;&#12365;&#12289;&#21462;&#24471;&#12375;&#12383;&#12450;&#12459;&#12454;&#12531;&#12488;&#12395;&#12525;&#12464;&#12452;&#12531;&#12375;&#12390;&#12289;&#12302;&#12503;&#12525;&#12496;&#12452;&#12480;&#12540;&#12522;&#12473;&#12488;&#12303;&#12363;&#12425;&#25152;&#23450;&#12398;&#12503;&#12525;&#12496;&#12452;&#12480;&#12540;&#12434;&#36984;&#12403;&#12289;&#12473;&#12486;&#12483;&#12503;1&#12391;&#20316;&#25104;&#12375;&#12383;Messaging API&#12434;&#36984;&#12403;&#12414;&#12377;&#12290;<\/p><p>&#12302;&#12481;&#12515;&#12493;&#12523;&#22522;&#26412;&#35373;&#23450;&#12303;&#12434;&#35211;&#12427;&#12392;&#12289;&#12503;&#12521;&#12531;&#12364;&#12302;For Developer&#12303;&#12392;&#12394;&#12387;&#12390;&#12362;&#12426;&#12289;&#21033;&#29992;&#21487;&#33021;&#12394;&#27231;&#33021;&#12395;&#12302;REPLY_MESSAGE&#12303;,&#12302;PUSH_MESSAGE&#12303;&#12364;&#30906;&#35469;&#12391;&#12365;&#12428;&#12400;&#12289;&#21839;&#38988;&#12394;&#12367;&#20966;&#29702;&#12434;&#36914;&#12417;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;<\/p><p>&#30011;&#38754;&#12398;&#19968;&#30058;&#19979;&#12395;&#12354;&#12427;QR&#12467;&#12540;&#12489;&#12434;&#12473;&#12510;&#12507;&#12391;&#35501;&#12415;&#21462;&#12427;&#12392;&#12289;LINE&#12508;&#12483;&#12488;&#12364;&#34920;&#31034;&#12373;&#12428;&#12427;&#12398;&#12391;&#12501;&#12457;&#12525;&#12540;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#12371;&#12398;&#12479;&#12452;&#12511;&#12531;&#12464;&#12391;&#12289;&#22971;&#12398;LINE&#12391;&#12418;&#12501;&#12457;&#12525;&#12540;&#12434;&#12375;&#12390;&#12362;&#12365;&#12414;&#12377;&#12290;<\/p><p>&nbsp;<\/p><h4><span class=\"ez-toc-section\" id=\"3GAS%E3%81%AE%E7%AB%8B%E3%81%A1%E4%B8%8A%E3%81%92\"><\/span>3.GAS&#12398;&#31435;&#12385;&#19978;&#12370;<span class=\"ez-toc-section-end\"><\/span><\/h4><p>Messaging API&#35373;&#23450;&#12398;&#21069;&#12395;&#12289;&#12392;&#12426;&#12354;&#12360;&#12378;Webhook&#12395;&#35373;&#23450;&#12377;&#12427;URL&#12434;&#21462;&#24471;&#12375;&#12383;&#12356;&#12398;&#12391;&#12289;<a href=\"https:\/\/drive.google.com\/drive\/my-drive\" target=\"_blank\" rel=\"noopener\">Google Drive<\/a>&#12363;&#12425;Google Apps Script&#12501;&#12449;&#12452;&#12523;&#12434;&#26032;&#35215;&#20316;&#25104;&#12375;&#12414;&#12377;&#12290;<\/p><p>&#20316;&#25104;&#12375;&#12383;&#12425;&#12289;&#19978;&#37096;&#12513;&#12491;&#12517;&#12540;&#12398;&#12302;&#20844;&#38283;&#12303;&#12363;&#12425;&#12302;&#12454;&#12455;&#12502;&#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;&#12392;&#12375;&#12390;&#23566;&#20837;&#12303;&#12434;&#34892;&#12356;&#12289;&#12302;&#12450;&#12503;&#12522;&#12465;&#12540;&#12471;&#12519;&#12531;&#12395;&#12450;&#12463;&#12475;&#12473;&#12391;&#12365;&#12427;&#12518;&#12540;&#12470;&#12540;&#12303;&#12434;&#12302;&#20840;&#21729;&#65288;&#21311;&#21517;&#12518;&#12540;&#12470;&#12540;&#12434;&#21547;&#12416;&#65289;&#12303;&#12395;&#22793;&#26356;&#12375;&#12390;&#12363;&#12425;&#12302;&#26356;&#26032;&#12303;&#12434;&#25276;&#12375;&#12414;&#12377;&#12290;&#12371;&#12428;&#12391;URL&#12434;&#21462;&#24471;&#12391;&#12365;&#12414;&#12377;&#12290;<\/p><p>&nbsp;<\/p><h4><span class=\"ez-toc-section\" id=\"4Messaging_API%E3%81%AE%E8%A8%AD%E5%AE%9A\"><\/span>4.Messaging API&#12398;&#35373;&#23450;<span class=\"ez-toc-section-end\"><\/span><\/h4><p>GAS&#12392;&#36899;&#25658;&#12377;&#12427;&#12383;&#12417;&#12395;&#12289;&#25913;&#12417;&#12390;&#12473;&#12486;&#12483;&#12503;2&#12391;&#30906;&#35469;&#12375;&#12383;&#12302;&#12481;&#12515;&#12493;&#12523;&#22522;&#26412;&#35373;&#23450;&#12303;&#12434;&#38283;&#12365;&#12414;&#12377;&#12290;&#20013;&#27573;&#12395;&#12354;&#12427;&#12302;&#12513;&#12483;&#12475;&#12540;&#12472;&#36865;&#21463;&#20449;&#35373;&#23450;&#12303;&#12395;&#12390;&#12302;&#12450;&#12463;&#12475;&#12473;&#12488;&#12540;&#12463;&#12531;&#12303;&#12434;&#30330;&#34892;&#12375;&#12414;&#12377;&#12290;&#12371;&#12398;&#12450;&#12463;&#12475;&#12473;&#12488;&#12540;&#12463;&#12531;&#12399;&#24460;&#12391;&#20351;&#12358;&#12398;&#12391;&#12289;&#12467;&#12500;&#12540;&#12375;&#12390;&#12362;&#12365;&#12414;&#12377;&#12290;<\/p><p>&#32154;&#12356;&#12390;&#12302;Webhook&#36865;&#20449;&#12303;&#12434;&#12302;&#21033;&#29992;&#12377;&#12427;&#12303;&#12395;&#22793;&#26356;&#12375;&#12289;&#12302;Webhook URL&#12303;&#12395;&#12473;&#12486;&#12483;&#12503;3&#12391;&#21462;&#24471;&#12375;&#12383;URL&#12434;&#30331;&#37682;&#12375;&#12414;&#12377;&#12290;&#12377;&#12427;&#12392;&#12302;&#25509;&#32154;&#30906;&#35469;&#12303;&#12508;&#12479;&#12531;&#12364;&#20986;&#12390;&#12367;&#12427;&#12398;&#12391;&#12289;&#12508;&#12479;&#12531;&#12434;&#25276;&#12375;&#12390;&#12300;&#25104;&#21151;&#12375;&#12414;&#12375;&#12383;&#12290;&#12301;&#12392;&#20986;&#12428;&#12400;&#25509;&#32154;&#23436;&#20102;&#12391;&#12377;&#12290;<\/p><p>&nbsp;<\/p><h4><span class=\"ez-toc-section\" id=\"5%E3%83%A6%E3%83%BC%E3%82%B6%E3%83%BCID%E3%81%AE%E5%8F%96%E5%BE%97\"><\/span>5.&#12518;&#12540;&#12470;&#12540;ID&#12398;&#21462;&#24471;<span class=\"ez-toc-section-end\"><\/span><\/h4><p>&#12371;&#12371;&#12364;&#20170;&#22238;&#19968;&#30058;&#12495;&#12510;&#12387;&#12383;&#12392;&#12371;&#12429;&#12391;&#12377;&#12290;<\/p><p>GAS&#12363;&#12425;&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12434;&#36865;&#12427;&#12395;&#12399;&#12289;&#36865;&#12426;&#20808;&#12398;LINE&#12518;&#12540;&#12470;&#12540;&#12398;&#12518;&#12540;&#12470;&#12540;ID&#12364;&#24517;&#35201;&#12391;&#12375;&#12390;&#12289;&#20170;&#22238;&#12399;&#22827;&#23142;&#20108;&#20154;&#12395;&#36865;&#12427;&#12383;&#12417;&#12289;&#20108;&#20154;&#12398;&#12518;&#12540;&#12470;&#12540;ID&#12364;&#24517;&#35201;&#12395;&#12394;&#12387;&#12383;&#12398;&#12391;&#12377;&#12290;<\/p><p>&#12518;&#12540;&#12470;&#12540;ID&#33258;&#20307;&#12399;&#12289;Messaging API&#12398;&#12302;&#12481;&#12515;&#12493;&#12523;&#22522;&#26412;&#35373;&#23450;&#12303;&#12398;&#19968;&#30058;&#19979;&#12395;&#12302;Your user ID&#12303;&#12392;&#12375;&#12390;&#34920;&#31034;&#12373;&#12428;&#12427;&#12398;&#12391;&#12377;&#12364;&#12289;&#12371;&#12398;&#27396;&#12391;&#25163;&#12395;&#20837;&#12387;&#12383;&#12518;&#12540;&#12470;&#12540;ID&#12399;&#31169;&#12398;&#12418;&#12398;&#12384;&#12369;&#12391;&#12375;&#12383;&#12290;&#12381;&#12358;&#12289;&#22971;&#12398;&#12518;&#12540;&#12470;&#12540;ID&#12399;&#12393;&#12358;&#12420;&#12387;&#12390;&#21462;&#12428;&#12400;&#12356;&#12356;&#12398;&#12363;&#12289;&#12392;&#12356;&#12358;&#21839;&#38988;&#12364;&#30330;&#29983;&#12375;&#12383;&#12398;&#12391;&#12377;&#12290;<\/p><p>&#26368;&#32066;&#30340;&#12395;&#12399;&#12289;&#12302;&#27177;&#38480;&#31649;&#29702;&#12303;&#27231;&#33021;&#12391;&#22971;&#12434;&#12302;Admin&#12303;&#12392;&#12375;&#12390;&#36861;&#21152;&#12375;&#12289;&#22971;&#12398;&#12450;&#12459;&#12454;&#12531;&#12488;&#12391;&#12525;&#12464;&#12452;&#12531;&#12375;&#12383;&#12358;&#12360;&#12391;&#12302;Your user ID&#12303;&#12434;&#30906;&#35469;&#12375;&#12414;&#12375;&#12383;&#12290;&#22971;&#12398;&#12450;&#12459;&#12454;&#12531;&#12488;&#12391;&#12525;&#12464;&#12452;&#12531;&#12377;&#12428;&#12400;&#22971;&#12398;&#12518;&#12540;&#12470;&#12540;ID&#12364;&#21462;&#24471;&#12391;&#12365;&#12427;&#12289;&#12392;&#12356;&#12358;&#31278;&#26126;&#12363;&#12375;&#12391;&#12377;&#12364;&#12289;&#12385;&#12423;&#12387;&#12392;&#38754;&#20498;&#12377;&#12366;&#12539;&#12539;&#12539;<\/p><p>&#19968;&#24540;&#12289;&#12501;&#12457;&#12525;&#12540;&#12452;&#12505;&#12531;&#12488;&#12398;&#20013;&#12395;&#12354;&#12427;&#12518;&#12540;&#12470;&#12540;ID&#12434;&#21462;&#24471;&#12377;&#12427;API&#12418;&#12354;&#12426;&#12414;&#12377;&#12364;&#12289;&#12383;&#12363;&#12384;&#12363;&#22266;&#23450;&#12398;&#12518;&#12540;&#12470;&#12540;ID&#19968;&#12388;&#12434;&#21462;&#24471;&#12377;&#12427;&#12383;&#12417;&#12395;&#12473;&#12463;&#12522;&#12503;&#12488;&#12434;&#26360;&#12365;&#19978;&#12370;&#12427;&#12398;&#12418;&#24494;&#22937;&#12391;&#12377;&#12424;&#12397;&#12290;&#12394;&#12435;&#12392;&#12363;&#12394;&#12425;&#12394;&#12356;&#12398;&#12363;&#12394;&#12353;&#12539;&#12539;&#12539;<\/p><p><span style=\"color: #ff0000;\">&#27880;&#24847;&#9315;&#65306;&#12302;&#12486;&#12473;&#12479;&#12540;&#31649;&#29702;&#12303;&#27231;&#33021;&#12391;&#12486;&#12473;&#12479;&#12540;&#12392;&#12375;&#12390;&#36861;&#21152;&#12375;&#12383;&#22580;&#21512;&#12289;&#12525;&#12464;&#12452;&#12531;&#12375;&#12390;&#12418;&#12518;&#12540;&#12470;&#12540;ID&#12364;&#30906;&#35469;&#12391;&#12365;&#12378;&#12289;&#19978;&#20301;&#27177;&#38480;&#12408;&#12398;&#22793;&#26356;&#12418;&#12391;&#12365;&#12394;&#12356;&#12383;&#12417;&#12289;&#19968;&#24230;&#12450;&#12459;&#12454;&#12531;&#12488;&#21066;&#38500;&#12375;&#12390;&#12363;&#12425;Admin&#30331;&#37682;&#12377;&#12427;&#12371;&#12392;&#12395;&#12394;&#12426;&#12414;&#12377;&#12290;<\/span><\/p><p>&nbsp;<\/p><h4><span class=\"ez-toc-section\" id=\"6%E3%83%97%E3%83%83%E3%82%B7%E3%83%A5%E9%80%9A%E7%9F%A5%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%AE%E4%BD%9C%E6%88%90\"><\/span>6.&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12473;&#12463;&#12522;&#12503;&#12488;&#12398;&#20316;&#25104;<span class=\"ez-toc-section-end\"><\/span><\/h4><p>&#24517;&#35201;&#12394;&#24773;&#22577;&#12364;&#25539;&#12387;&#12383;&#12398;&#12391;&#12289;<a href=\"https:\/\/developers.line.me\/ja\/docs\/messaging-api\/\" target=\"_blank\" rel=\"noopener\">&#12522;&#12501;&#12449;&#12524;&#12531;&#12473;<\/a>&#12434;&#35211;&#12394;&#12364;&#12425;&#23455;&#38555;&#12395;GAS&#19978;&#12391;&#12473;&#12463;&#12522;&#12503;&#12488;&#12434;&#26360;&#12356;&#12390;&#12356;&#12365;&#12414;&#12377;&#12290;<\/p><p>&#27880;&#24847;&#12375;&#12394;&#12356;&#12392;&#12356;&#12369;&#12394;&#12356;&#12398;&#12399;&#12289;&#20170;&#22238;&#12399;&#22827;&#23142;&#20108;&#20154;&#12395;&#21516;&#26178;&#36865;&#20449;&#12377;&#12427;&#12392;&#12356;&#12358;&#12371;&#12392;&#12391;&#12377;&#12290;&#19968;&#20154;&#12391;&#12354;&#12428;&#12400;push API&#12391;&#22823;&#19976;&#22827;&#12391;&#12377;&#12364;&#12289;&#35079;&#25968;&#12394;&#12398;&#12391;multicast API&#12434;&#20351;&#12387;&#12390;&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12434;&#36865;&#12427;&#38306;&#25968;&#12434;&#20316;&#12426;&#12414;&#12377;&#12290;&#12394;&#12362;&#12289;push&#12392;&#12398;&#24046;&#20998;&#12399;&#12289;&#9312;&#12518;&#12540;&#12470;&#12540;ID&#12398;&#22793;&#25968;&#12364;&#25991;&#23383;&#21015;&#12363;&#12425;&#25991;&#23383;&#21015;&#37197;&#21015;&#12395;&#22793;&#12431;&#12387;&#12383;&#12289;&#9313;&#12509;&#12473;&#12488;&#20808;&#12398;URL&#12364;push&#12363;&#12425;multicast&#12395;&#22793;&#12431;&#12387;&#12383;&#12289;&#12398;2&#28857;&#12391;&#12377;&#12397;&#12290;<\/p><p>&nbsp;<\/p><p><strong>&#25351;&#23450;&#12375;&#12383;&#25991;&#23383;&#21015;&#12434;&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12377;&#12427;<\/strong><\/p><pre class=\"lang:js decode:true\">function PushMessage(buf) {\r\n  \r\n  var accessToken = '{access_token}';\r\n  var userIds = ['{user_id1}', '{user_id2}'];\r\n  \r\n  var url = 'https:\/\/api.line.me\/v2\/bot\/message\/multicast';\r\n  var headers = {\r\n    'Content-Type' : 'application\/json; charset=UTF-8',\r\n    'Authorization': 'Bearer ' + accessToken;\r\n  };\r\n  var postData = {\r\n    'to' : userIds,\r\n    'messages' : [{'type':'text', 'text':buf}]\r\n  };\r\n  var options = {\r\n    'method' : 'post',\r\n    'headers' : headers,\r\n    'payload' : JSON.stringify(postData)\r\n  };\r\n  return UrlFetchApp.fetch(url, options);\r\n  \r\n}<\/pre><p>&#12371;&#12428;&#12391;&#36969;&#24403;&#12395;&#20316;&#12387;&#12383;&#25991;&#23383;&#21015;&#12434;&#24341;&#25968;&#12395;&#25918;&#12426;&#36796;&#12435;&#12391;&#23455;&#34892;&#12377;&#12428;&#12400;&#12289;&#20108;&#20154;&#12398;LINE&#12395;&#12503;&#12483;&#12471;&#12517;&#36890;&#30693;&#12434;&#36865;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12427;&#12424;&#12358;&#12395;&#12394;&#12426;&#12414;&#12375;&#12383;&#12290;&#38306;&#25968;&#12395;&#26178;&#38291;&#20027;&#23566;&#22411;&#12398;&#12488;&#12522;&#12460;&#12540;&#12434;&#35373;&#23450;&#12377;&#12427;&#12392;&#12289;&#23450;&#26399;&#30340;&#12395;&#36865;&#20449;&#12377;&#12427;&#12371;&#12392;&#12364;&#12391;&#12365;&#12414;&#12377;&#12290;&#12371;&#12428;&#12391;&#22303;&#21488;&#12399;&#12496;&#12483;&#12481;&#12522;&#12391;&#12377;&#12397;&#12290;<\/p><p>&nbsp;<\/p><h4><span class=\"ez-toc-section\" id=\"7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E3%81%AE%E3%82%88%E3%82%82%E3%82%84%E3%81%BE%E8%A9%B1\"><\/span>7.&#12467;&#12531;&#12486;&#12531;&#12484;&#12398;&#12424;&#12418;&#12420;&#12414;&#35441;<span class=\"ez-toc-section-end\"><\/span><\/h4><p>&#32925;&#24515;&#12398;&#23450;&#26399;&#36865;&#20449;&#12377;&#12427;&#12467;&#12531;&#12486;&#12531;&#12484;&#12391;&#12377;&#12364;&#12289;&#22522;&#26412;&#30340;&#12394;&#32771;&#12360;&#26041;&#12392;&#12375;&#12390;&#12399;&#12289;<\/p><p>(1) G Suite =&gt; GAS&#12398;&#21508;&#31278;&#12463;&#12521;&#12473;&#12434;&#20351;&#12358;<\/p><p>(2) API&#12398;&#12354;&#12427;&#12469;&#12540;&#12499;&#12473; =&gt; API&#12434;&#20351;&#12358;<\/p><p>(3) API&#12398;&#12394;&#12356;&#12469;&#12540;&#12499;&#12473; =&gt; &#12473;&#12463;&#12524;&#12452;&#12500;&#12531;&#12464;&#12377;&#12427;<\/p><p>&#12392;&#12356;&#12358;&#24863;&#12376;&#12391;&#12377;&#12290;&#20170;&#22238;&#12399;&#12289;&#12302;CalendarApp&#12303;&#12463;&#12521;&#12473;&#12434;&#20351;&#12387;&#12390;Google&#12459;&#12524;&#12531;&#12480;&#12540;&#12363;&#12425;&#26126;&#26085;&#12398;&#20104;&#23450;&#12434;&#12289;&#12302;Tasks&#12303;&#12463;&#12521;&#12473;&#12434;&#20351;&#12387;&#12390;Google&#12479;&#12473;&#12463;&#12363;&#12425;&#27531;&#12479;&#12473;&#12463;&#12434;&#12289;&#12302;UrlFetchApp&#12303;&#12463;&#12521;&#12473;&#12434;&#20351;&#12387;&#12390;tenki.jp&#12363;&#12425;&#26126;&#26085;&#12398;&#22825;&#27671;&#20104;&#22577;&#12434;&#21462;&#24471;&#12375;&#12388;&#12388;&#12289;&#26332;&#26085;&#12395;&#12424;&#12427;&#20998;&#23696;&#12391;&#12468;&#12511;&#20986;&#12375;&#24773;&#22577;&#12394;&#12435;&#12363;&#12434;&#23626;&#12369;&#12427;&#24863;&#12376;&#12391;&#12377;&#12397;&#12290;<\/p><p>&#21442;&#32771;&#12414;&#12391;&#12395;&#12289;&#22522;&#26412;&#30340;&#12394;&#27083;&#25991;&#12384;&#12369;&#25522;&#36617;&#12375;&#12414;&#12377;&#12290;<\/p><p>&nbsp;<\/p><p><strong>Google&#12459;&#12524;&#12531;&#12480;&#12540;&#12363;&#12425;&#26126;&#26085;&#12398;&#20104;&#23450;&#12434;&#21462;&#24471;&#12377;&#12427;<\/strong><\/p><pre class=\"lang:default decode:true \">function GetGoogleCalendar(){\r\n  \r\n  var date = new Date();\r\n  date.setDate(date.getDate() + 1);\r\n  var startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0);\r\n  date.setDate(date.getDate() + 1);\r\n  var endDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0);\r\n  var events = CalendarApp.getDefaultCalendar().getEvents(startDate, endDate);\r\n  \r\n  if (events.length == 0){return '&#12394;&#12375;';}\r\n  var texts = [], hasDateText;\r\n  for (var i = 0; i &lt; events.length; i++){\r\n    hasDateText = (events[i].getStartTime().getDate() != events[i].getEndTime().getDate());\r\n    texts.push(DateFormat(events[i].getStartTime(),hasDateText) + '-' + DateFormat(events[i].getEndTime(),hasDateText) + ' ' + events[i].getTitle());\r\n  }\r\n  return texts.join('\\n');\r\n  \r\n}\r\n\r\nfunction DateFormat(date, hasDateText){\r\n  \r\n  var buf = '';\r\n  if (hasDateText){\r\n    buf += (date.getMonth() + 1) + '\/' + date.getDate() + '(' + [ \"&#26085;\", \"&#26376;\", \"&#28779;\", \"&#27700;\", \"&#26408;\", \"&#37329;\", \"&#22303;\" ][date.getDay()] + ')';\r\n  }\r\n  var hours = date.getHours();\r\n  var minutes = date.getMinutes();\r\n  return buf + (hours &lt; 10 ? '0' : '') + hours + ':' + (minutes &lt; 10 ? '0' : '') + minutes;\r\n  \r\n}<\/pre><p><span style=\"color: #ff0000;\">&#27880;&#24847;&#9316;&#65306;&#22522;&#26412;&#12399;&#26178;&#21051;&#12392;&#20214;&#21517;&#12398;&#12415;&#12398;&#34920;&#31034;&#12391;&#12377;&#12364;&#12289;&#26085;&#12434;&#12414;&#12383;&#12368;&#12452;&#12505;&#12531;&#12488;&#12398;&#22580;&#21512;&#12399;&#26085;&#12395;&#12385;&#12418;&#34920;&#31034;&#12375;&#12383;&#12356;&#12383;&#12417;&#12289;DateFormat&#12392;&#12356;&#12358;&#38306;&#25968;&#12434;&#20316;&#25104;&#12375;&#12414;&#12375;&#12383;&#12290;<\/span><\/p><p>&nbsp;<\/p><p><strong>Google&#12479;&#12473;&#12463;&#65288;ToDo&#12522;&#12473;&#12488;&#65289;&#12398;&#25351;&#23450;&#12522;&#12473;&#12488;&#12363;&#12425;<\/strong><strong>&#27531;&#12479;&#12473;&#12463;&#12434;&#21462;&#24471;&#12377;&#12427;<\/strong><\/p><pre class=\"lang:default decode:true\">function GetGoogleTasks(listTitle) {\r\n  \r\n  var texts = [];\r\n  var lists = Tasks.Tasklists.list().getItems();\r\n  for (var i = 0; i &lt; lists.length; i++){\r\n    if (lists[i].getTitle() == listTitle){\r\n      var tasks = Tasks.Tasks.list(lists[i].getId()).getItems();\r\n      for (var j = 0; j &lt; tasks.length; j++){\r\n        if (tasks[j].getStatus() == 'needsAction'){\r\n          texts.push(tasks[j].getTitle());\r\n        }\r\n      }\r\n    }\r\n  }\r\n  if (texts.length == 0){return '&#12394;&#12375;';}\r\n  return texts.join('\\n');    \r\n  \r\n}<\/pre><p><span style=\"color: #ff0000;\">&#27880;&#24847;&#9317;&#65306;Google&#12479;&#12473;&#12463;&#12398;&#12463;&#12521;&#12473;&#12302;Tasks&#12303;&#12399;GAS&#12398;&#12522;&#12477;&#12540;&#12473;&#25313;&#24373;&#12434;&#12375;&#12383;&#12358;&#12360;&#12391;&#12289;Google Cloud Platform&#12395;&#30331;&#37682;&#12375;&#12289;Google API&#20596;&#12391;&#21033;&#29992;&#35215;&#32004;&#12395;&#21516;&#24847;&#12377;&#12427;&#24517;&#35201;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;<\/span><\/p><p>&nbsp;<\/p><p><strong>&#25351;&#23450;&#12375;&#12383;URL&#12395;&#12362;&#12356;&#12390;&#12289;&#25351;&#23450;&#12375;&#12383;&#27491;&#35215;&#34920;&#29694;&#12395;&#21512;&#33268;&#12377;&#12427;HTML&#32676;&#12434;&#36820;&#12377;&#65288;&#12356;&#12431;&#12422;&#12427;&#12473;&#12463;&#12524;&#12452;&#12500;&#12531;&#12464;&#65289;<\/strong><\/p><pre class=\"lang:js decode:true\">function Scrape(url, regularExpression) {\r\n\r\n  var text = UrlFetchApp.fetch(url).getContentText();\r\n  var match = text.match(regularExpression);\r\n  return match;\r\n\r\n}<\/pre><p><span style=\"color: #ff0000;\">&#27880;&#24847;&#9318;&#65306;&#20855;&#20307;&#30340;&#12395;&#33258;&#28982;&#12394;LINE&#12513;&#12483;&#12475;&#12540;&#12472;&#12395;&#33853;&#12392;&#12375;&#36796;&#12416;&#12395;&#12399;&#12289;&#12354;&#12427;&#31243;&#24230;HTML&#12434;&#35501;&#12416;&#12473;&#12461;&#12523;&#12434;&#25345;&#12387;&#12383;&#21069;&#25552;&#12391;&#12289;&#27491;&#35215;&#34920;&#29694;&#31561;&#12434;&#20351;&#12356;&#12371;&#12394;&#12379;&#12427;&#24517;&#35201;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;API&#12434;&#20351;&#12362;&#12358;&#12392;&#24605;&#12356;&#12388;&#12367;&#20154;&#12395;&#12392;&#12387;&#12390;&#12399;&#12289;&#12414;&#12354;&#21839;&#38988;&#12394;&#12356;&#12363;&#12392;&#12399;&#24605;&#12356;&#12414;&#12377;&#12364;&#12539;&#12539;&#12539;&#12290;<\/span><\/p><p>&nbsp;<\/p><p>&#12371;&#12371;&#12395;&#26360;&#12356;&#12390;&#12356;&#12394;&#12356;&#12418;&#12398;&#12391;&#12399;&#12289;API&#12364;&#20844;&#38283;&#12373;&#12428;&#12390;&#12356;&#12427;&#23478;&#35336;&#31807;&#12450;&#12503;&#12522;&#12398;Zaim&#12354;&#12383;&#12426;&#12364;&#12289;&#23478;&#20107;&#32946;&#20816;&#12398;&#12469;&#12509;&#12540;&#12488;&#12392;&#12356;&#12358;&#38754;&#12391;&#12399;&#12450;&#12484;&#12356;&#38936;&#22495;&#12391;&#12377;&#12290;<a href=\"https:\/\/dev.zaim.net\/home\/api\/\" target=\"_blank\" rel=\"noopener\">Zaim API<\/a>&#12399;&#12522;&#12501;&#12449;&#12524;&#12531;&#12473;&#12364;&#65288;&#33521;&#35486;&#12384;&#12369;&#12393;&#65289;&#32048;&#12363;&#12367;&#26360;&#12363;&#12428;&#12390;&#12356;&#12427;&#12398;&#12391;&#23566;&#20837;&#12375;&#12420;&#12377;&#12367;&#12289;&#19968;&#36890;&#12426;&#12398;CRUD&#27231;&#33021;&#12364;&#24796;&#12375;&#12415;&#12394;&#12367;&#25552;&#20379;&#12373;&#12428;&#12390;&#12356;&#12427;&#12398;&#12391;&#22909;&#24863;&#12364;&#25345;&#12390;&#12414;&#12377;&#12290;&#12371;&#12435;&#12394;&#24863;&#12376;&#12395;&#12289;&#33394;&#12293;&#12394;&#12450;&#12503;&#12522;&#12392;&#36899;&#25658;&#12391;&#12365;&#12427;&#12392;&#22818;&#12364;&#24195;&#12364;&#12426;&#12414;&#12377;&#12397;&#12290;<\/p><p>&nbsp;<\/p><p>&#12393;&#12358;&#12356;&#12358;&#12467;&#12531;&#12486;&#12531;&#12484;&#12434;&#20309;&#26178;&#12395;&#36865;&#12427;&#12363;&#12395;&#12424;&#12387;&#12390;&#12372;&#23478;&#24237;&#12395;&#21512;&#12387;&#12383;&#12362;&#21161;&#12369;LINE&#12508;&#12483;&#12488;&#12364;&#20316;&#12428;&#12427;&#12363;&#12392;&#24605;&#12356;&#12414;&#12377;&#12398;&#12391;&#12289;&#33288;&#21619;&#12398;&#12354;&#12427;&#26041;&#12399;&#26159;&#38750;&#12362;&#35430;&#12375;&#12367;&#12384;&#12373;&#12356;&#12290;<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#23064;&#12398;&#32946;&#20816;&#12434;&#12365;&#12387;&#12363;&#12369;&#12395;&#22827;&#23142;&#12398;&#2084 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11932,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[266],"tags":[],"class_list":["post-11922","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-life-hack_ja"],"_links":{"self":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts\/11922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/comments?post=11922"}],"version-history":[{"count":11,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts\/11922\/revisions"}],"predecessor-version":[{"id":11934,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/posts\/11922\/revisions\/11934"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/media\/11932"}],"wp:attachment":[{"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/media?parent=11922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/categories?post=11922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takuminasuno.com\/ja\/wp-json\/wp\/v2\/tags?post=11922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}