{"id":3301,"date":"2021-03-11T16:33:50","date_gmt":"2021-03-11T07:33:50","guid":{"rendered":"https:\/\/taitan916.info\/blog\/?p=3301"},"modified":"2024-02-27T18:13:05","modified_gmt":"2024-02-27T09:13:05","slug":"post-3301","status":"publish","type":"post","link":"https:\/\/taitan916.info\/blog\/archives\/3301","title":{"rendered":"GAS\u3068LINE\u3092\u9023\u643a\u3055\u305b\u3066\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u308b\u65b9\u6cd5\u306e\u30e1\u30e2"},"content":{"rendered":"<p>Google Apps Script\u3068LINE\u3092\u9023\u643a\u3055\u305b\u3001LINE\u306b\u4f55\u3089\u304b\u306e\u901a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3057\u305f\u3044\u3002\u8abf\u3079\u305f\u3068\u3053\u308dLINE Notify\u3068\u3044\u3046\u30b5\u30fc\u30d3\u30b9\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u7121\u6599\u304b\u3064\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u308b\u3089\u3057\u3044\u3002\u4ee5\u4e0b\u306bLINE Notify\u5074\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3068GAS\u5074\u306e\u5b9f\u88c5\u65b9\u6cd5\u3092\u30e1\u30e2\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>LINE Notify\u5074\u306e\u4f5c\u696d<\/h2>\n<p>LINE Notify\u5074\u306e\u4f5c\u696d\u3092\u3059\u308b\u969b\u306bLINE\u7528\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u53ca\u3073\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002<\/p>\n<p>\u3069\u3061\u3089\u3082\u30b9\u30de\u30db\u304b\u3089LINE\u3092\u8d77\u52d5\u3057\u300c\u30db\u30fc\u30e0\u300d\u2192\u300c\u53f3\u4e0a\u6b6f\u8eca\u30de\u30fc\u30af\u300d\u2192\u300c\u30a2\u30ab\u30a6\u30f3\u30c8\u300d\u304b\u3089\u8a2d\u5b9a\u53ef\u80fd\u3002<\/p>\n<p>\u8a2d\u5b9a\u5f8c\u306f\u4e0b\u8a18\u306e\u901a\u308a\u4f5c\u696d\u3092\u884c\u3046\u3002<\/p>\n<h3>\u30c8\u30fc\u30af\u30f3\u3092\u767a\u884c\u3059\u308b<\/h3>\n<p>\u4ee5\u4e0b\u30da\u30fc\u30b8\u306e\u53f3\u4e0a\u306b\u3042\u308b\u30ed\u30b0\u30a4\u30f3\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3002<\/p>\n<p><a href=\"https:\/\/notify-bot.line.me\/ja\/\" target=\"_blank\" rel=\"noopener\">https:\/\/notify-bot.line.me\/ja\/<\/a><\/p>\n<p>\u30ed\u30b0\u30a4\u30f3\u5f8c\u306f\u53f3\u4e0a\u306e\u300c\u30e1\u30cb\u30e5\u30fc\u300d\u2192\u300c\u30de\u30a4\u30da\u30fc\u30b8\u300d\u2192\u300c\u30da\u30fc\u30b8\u4e0b\u90e8\u306e\u30c8\u30fc\u30af\u30f3\u3092\u767a\u884c\u3059\u308b\u300d\u3068\u9032\u307f\u3001\u30c8\u30fc\u30af\u30f3\u540d\u53ca\u3073\u30c8\u30fc\u30af\u30eb\u30fc\u30e0\u3092\u9078\u629e\u3059\u308b\u3002\u30c8\u30fc\u30af\u30f3\u540d\u306b\u95a2\u3057\u3066\u306f\u9069\u5f53\u3067\u826f\u3044\u304c\u30e1\u30c3\u30bb\u30fc\u30b8\u901a\u77e5\u6642\u306b\u8868\u793a\u3055\u308c\u308b\u3002\u30c8\u30fc\u30af\u30eb\u30fc\u30e0\u306f\u500b\u4eba\u7528\u306e\u901a\u77e5\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u300c1:1\u3067LINE Notify\u304b\u3089\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\u300d\u3092\u9078\u629e\u3059\u308b\u3002<\/p>\n<p>\u300c\u767a\u884c\u3059\u308b\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30c8\u30fc\u30af\u30f3\u304c\u767a\u884c\u3055\u308c\u3001\u30e9\u30f3\u30c0\u30e0\u82f1\u6570\u5b57\u306e\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u30b3\u30d4\u30fc\u3057\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u7b49\u306b\u30e1\u30e2\u3057\u3066\u304a\u304f\u3002<\/p>\n<h3>\u4f7f\u7528\u5236\u9650\u3068\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/h3>\n<p>\u901a\u77e5\u3092\u9001\u308b\u969b\u306fLINE Notify\u306eAPI\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u5f62\u3068\u306a\u308a\u30011\u30c8\u30fc\u30af\u30f31\u6642\u9593\u8fba\u308a\u6700\u59271,000\u56de\u307e\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u53ef\u80fd\u3002\u8a73\u7d30\u306f\u4ee5\u4e0b\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u53c2\u7167\u3002<\/p>\n<p><a href=\"https:\/\/notify-bot.line.me\/doc\/ja\/\" target=\"_blank\" rel=\"noopener\">https:\/\/notify-bot.line.me\/doc\/ja\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>GAS\u5074\u306e\u4f5c\u696d<\/h2>\n<p>GAS\u306e\u4f7f\u3044\u65b9\u306f\u30c9\u30c3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u4ee5\u4e0b\u30ec\u30c3\u30b9\u30f3\u3092\u898b\u3066\u304a\u304f\u3068\u4f55\u3068\u306a\u304f\u6982\u8981\u304c\u63b4\u3081\u308b\u3002<\/p>\n<p><a href=\"https:\/\/dotinstall.com\/lessons\/basic_google_apps_script_v2\" target=\"_blank\" rel=\"noopener\">https:\/\/dotinstall.com\/lessons\/basic_google_apps_script_v2<\/a><\/p>\n<h3>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>\u4ee5\u4e0bGoogle\u30c9\u30e9\u30a4\u30d6\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u5de6\u4e0a\u300c\u65b0\u898f\u30dc\u30bf\u30f3\u300d\u2192\u300cGoogle \u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u300d\u304b\u3089\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b\u3002<\/p>\n<p><a href=\"https:\/\/drive.google.com\/drive\/u\/0\/\" target=\"_blank\" rel=\"noopener\">https:\/\/drive.google.com\/drive\/u\/0\/<\/a><\/p>\n<p>\u30b7\u30fc\u30c8\u540d\u306f\u9069\u5f53\u3067\u826f\u3044\u3002\u305d\u306e\u5f8c\u300c\u30c4\u30fc\u30eb\u300d\u2192\u300c\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u300d\u3068\u9032\u307f\u3001\u9069\u5f53\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u540d\u3092\u3064\u3051\u308b\u3002<\/p>\n<h3>API\u30ea\u30af\u30a8\u30b9\u30c8\u7528\u306e\u30bd\u30fc\u30b9<\/h3>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u30bd\u30fc\u30b9\u306f\u524a\u9664\u3057\u305f\u4e0a\u3067\u4ee5\u4e0b\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">function sendLINE() {\r\n    \/\/\u30e1\u30c3\u30bb\u30fc\u30b8\u5185\u5bb9\u3002\u6539\u884c\u3092\u5165\u308c\u308b\u5834\u5408\u306f\\\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\r\n    const messageText = '\u30c6\u30b9\u30c8\u3067\u3059\u3002\\\r\n    \u30c6\u30b9\u30c8\u30c6\u30b9\u30c8';\r\n\r\n    \/\/LINE\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c8\u30fc\u30af\u30f3\r\n    const token = 'xxxxxxxxxxxxxxxxxx';\r\n\r\n    \/\/fetch\u7528\u306e\u8a73\u7d30\u30d1\u30e9\u30e1\u30fc\u30bf\r\n    const options = {\r\n        'method' : 'post',\r\n        'headers' : {\r\n            'Authorization' : 'Bearer '+ token\r\n        },\r\n        'payload' : {\r\n            'message' : messageText\r\n        }\r\n    };\r\n\r\n    \/\/LINE API\u306eURL\r\n    let url  = 'https:\/\/notify-api.line.me\/api\/notify';\r\n\r\n    \/\/API\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u5fdc\u7b54\u3092\u53d7\u4fe1\u3059\u308b\r\n    UrlFetchApp.fetch(url, options);\r\n}<\/pre>\n<h3>\u30b9\u30af\u30ea\u30d7\u30c8\u5b9f\u884c<\/h3>\n<p>\u30bd\u30fc\u30b9\u3092\u8a18\u8ff0\u3057\u305f\u5f8c\u3001\u300cShift + S\u300d\u30ad\u30fc\u3067\u4e0a\u66f8\u304d\u4fdd\u5b58\u3057\u3001\u30da\u30fc\u30b8\u4e0a\u90e8\u306e\u300c\u5b9f\u884c\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u521d\u56de\u306f\u30a2\u30af\u30bb\u30b9\u6a29\u9650\u306e\u78ba\u8a8d\u306e\u70ba\u3001\u627f\u8a8d\u4f5c\u696d\u304c\u5fc5\u8981\u306b\u306a\u308b\u306e\u3067\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u6848\u5185\u3092\u898b\u3066\u4f5c\u696d\u3092\u9032\u3081\u308b\u3002\u7279\u306b\u96e3\u3057\u3044\u3053\u3068\u306f\u306a\u3044\u304c\u30c9\u30c3\u30c8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u7121\u6599\u7bc4\u56f2\u5185\u3067\u8aac\u660e\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u4f5c\u696d\u65b9\u6cd5\u304c\u5206\u304b\u3089\u306a\u3044\u5834\u5408\u306f\u305d\u3061\u3089\u3092\u53c2\u7167\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068LINE\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u901a\u77e5\u3055\u308c\u308b\u3002<\/p>\n<h3>UrlFetchApp.fetch(url, options)<\/h3>\n<p>GAS\u5074\u306e\u95a2\u6570\u3067\u4ed6\u30b5\u30a4\u30c8\u3084API\u306b\u30a2\u30af\u30bb\u30b9\u3057\u5fdc\u7b54\u30c7\u30fc\u30bf\u3092\u53d7\u4fe1\u3059\u308b\u3068\u3044\u3063\u305f\u3082\u306e\u3002\u8a73\u7d30\u306f\u4ee5\u4e0b\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u53c2\u7167\u3002<\/p>\n<p><a href=\"https:\/\/developers.google.com\/apps-script\/reference\/url-fetch\/url-fetch-app\" target=\"_blank\" rel=\"noopener\">https:\/\/developers.google.com\/apps-script\/reference\/url-fetch\/url-fetch-app<\/a><\/p>\n<h3>'Authorization' : 'Bearer '+ token<\/h3>\n<p>token\u306fLINE\u7528\u306e\u30c8\u30fc\u30af\u30f3\u3068\u5206\u304b\u308b\u304c\u3001Bearer\u306f\u4f55\uff1f \u3068\u306a\u3063\u305f\u306e\u3067\u8abf\u3079\u305f\u3068\u3053\u308d\u3001\u4ee5\u4e0b\u4e00\u6587\u304c<a href=\"https:\/\/notify-bot.line.me\/doc\/ja\/\" target=\"_blank\" rel=\"noopener\">\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u305f\u3002<\/p>\n<blockquote><p>\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u306b Authorization: Bearer &lt;access_token&gt; \u3092\u4ed8\u4e0e\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p><\/blockquote>\n<p>Bearer\u304c\u300c\u904b\u3076\u4eba\u3001\u904b\u642c\u4eba\u3001\u62c5\u3046\u4eba\u300d\u3068\u3044\u3046\u610f\u5473\u307f\u305f\u3044\u306a\u306e\u3067\u3001\u300cxxxxxx\u300d\u3068\u3044\u3046\u30c8\u30fc\u30af\u30f3\u3067\u904b\u3073\u307e\u3059\u3088\u3001\u3068\u3044\u3046\u3053\u3068\u3060\u308d\u3046\u304b\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u6240\u611f<\/h2>\n<p>\u601d\u3063\u305f\u3088\u308a\u7c21\u5358\u306bGAS\u3068LINE\u306e\u9023\u643a\u304c\u3067\u304d\u305f\u3002\u3068\u3044\u3046\u3088\u308a\u3082LINE\u5074\u306eAPI\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u3044\u308b\u3060\u3051\u306a\u306e\u3067GAS\u4ee5\u5916\u3067\u3082\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u305d\u3046\u3002\u305b\u3063\u304b\u304f\u306a\u306e\u3067PHP\u3067\u3082\u9023\u643a\u3055\u305b\u3066\u307f\u3088\u3046\u3068\u601d\u3046\u3002<\/p>\n<p>\u5c1a\u3001GAS\u306e\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u30b5\u30fc\u30d0\u3092\u7528\u610f\u3059\u308b\u5fc5\u8981\u304c\u7121\u304f\u3001\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u3061\u3087\u3063\u3068\u3057\u305f\u30bd\u30fc\u30b9\u3092\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u5b8c\u6210\u3059\u308b\u305f\u3081\u3001\u7c21\u5358\u306a\u500b\u4eba\u30c4\u30fc\u30eb\u3068\u304b\u3060\u3068\u6c17\u8efd\u306b\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u304c\u30e1\u30ea\u30c3\u30c8\u304b\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u53c2\u8003\u30b5\u30a4\u30c8<\/h2>\n<p><a href=\"https:\/\/note.com\/skipla\/n\/nefdfa2abd350\" target=\"_blank\" rel=\"noopener\">https:\/\/note.com\/skipla\/n\/nefdfa2abd350<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Apps Script\u3068LINE\u3092\u9023\u643a\u3055\u305b\u3001LINE\u306b\u4f55\u3089\u304b\u306e\u901a\u77e5 ... <\/p>\n","protected":false},"author":1,"featured_media":4313,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[72,70],"tags":[98],"class_list":["post-3301","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-apps-script","category-google","tag-line"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/3301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/comments?post=3301"}],"version-history":[{"count":2,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/3301\/revisions"}],"predecessor-version":[{"id":4679,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/posts\/3301\/revisions\/4679"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media\/4313"}],"wp:attachment":[{"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/media?parent=3301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/categories?post=3301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taitan916.info\/blog\/wp-json\/wp\/v2\/tags?post=3301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}