{"id":6501,"date":"2022-10-06T23:38:00","date_gmt":"2022-10-06T14:38:00","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=6501"},"modified":"2022-10-10T21:00:56","modified_gmt":"2022-10-10T12:00:56","slug":"post-6501","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=6501","title":{"rendered":"GAS\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff01\u30c1\u30e3\u30c3\u30c8\u5c65\u6b74\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306b\u4fbf\u5229"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u306fChatworkAPI\u304c\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001API\u7d4c\u7531\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6295\u7a3f\u3057\u305f\u308a\u3001\u30c1\u30e3\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Google Apps Script(GAS)\u3068\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u30b0\u30eb\u30fc\u30d7\u30c1\u30e3\u30c3\u30c8\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u4f7f\u3048\u3070\u3001\u901a\u5e38\u30d6\u30e9\u30a6\u30b6\u3067\u64cd\u4f5c\u3059\u308b\u4f5c\u696d\u3092API\u7d4c\u7531\u3067\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u4e2d\u3067\u3082\u30cb\u30fc\u30ba\u304c\u9ad8\u3044\u306e\u304c\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u6295\u7a3f\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092API\u3092\u53e9\u3044\u3066\u53d6\u5f97\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"412\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001.jpg\" alt=\"\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af(Chatwork)\u306f\u65e5\u672c\u56fd\u7523\u306e\u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\u3067\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u3067\u5229\u7528\u30e6\u30fc\u30b6\u30fc\u304c\u591a\u3044\u30b5\u30fc\u30d3\u30b9\" class=\"wp-image-6462\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001-300x155.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001-768x396.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001-530x273.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001-565x291.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001-710x366.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221002_auto_001-725x373.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306f2022\u5e7410\u67086\u65e5\u3088\u308a\u5229\u7528\u898f\u7d04\u304c\u5909\u66f4\u3055\u308c\u3001\u7121\u6599\u30d7\u30e9\u30f3\u3067\u95b2\u89a7\u3067\u304d\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u6570\u304c\u5236\u9650\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u904e\u53bb40\u65e5\u4ee5\u5185\u307e\u305f\u306f\u6700\u65b05000\u4ef6\u307e\u3067\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3057\u304b\u95b2\u89a7\u3067\u304d\u306a\u304f\u306a\u308a\u3001\u305d\u308c\u4ee5\u524d\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u975e\u8868\u793a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3046\u3057\u305f\u70b9\u304b\u3089\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u304c\u3067\u304d\u308c\u3070\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u51fa\u3059\u306a\u3069\u3057\u3066\u4fdd\u7ba1\u3057\u3066\u304a\u304f\u3053\u3068\u304c\u3067\u304d\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GAS\u30e9\u30a4\u30d6\u30e9\u30eaChatWorkClient\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u4e0d\u53ef<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u5e38Google Apps Script(GAS)\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u64cd\u4f5c\u3059\u308b\u5834\u5408\u3001ChatWorkClient\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"406\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003.jpg\" alt=\"Google Apps Script(GAS)\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u753b\u9762\u3067ChatWorkClient\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u8ffd\u52a0\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\" class=\"wp-image-6484\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003-300x152.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003-768x390.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003-530x269.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003-565x287.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003-710x360.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221004_auto_003-725x368.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">ChatWorkClient\u3092\u5229\u7528\u3059\u308c\u3070\u3001GAS\u304b\u3089\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u7c21\u5358\u306b\u5b9f\u884c\u3067\u304d\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3057\u304b\u3057\u3001ChatWorkClient\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3067\u53ef\u80fd\u306a\u64cd\u4f5c\u304c\u5168\u3066\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u6295\u7a3f\u3084\u30eb\u30fc\u30e0ID\u30fb\u30bf\u30b9\u30af\u306e\u53d6\u5f97\u306fChatWorkClient\u304b\u3089\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"fdA24VxXqG\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=6478\">GAS\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u7d4c\u7531\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6295\u7a3f\u3059\u308b\u65b9\u6cd5(ChatworkClient\u30e9\u30a4\u30d6\u30e9\u30ea)<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;GAS\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u7d4c\u7531\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6295\u7a3f\u3059\u308b\u65b9\u6cd5(ChatworkClient\u30e9\u30a4\u30d6\u30e9\u30ea)&#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=6478&#038;embed=true#?secret=l7QcpjN5sw#?secret=fdA24VxXqG\" data-secret=\"fdA24VxXqG\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"DX5q5sPXoM\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=6489\">GAS\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u304b\u3089\u30eb\u30fc\u30e0ID\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5(getRooms\u30e1\u30bd\u30c3\u30c9)<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;GAS\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u304b\u3089\u30eb\u30fc\u30e0ID\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5(getRooms\u30e1\u30bd\u30c3\u30c9)&#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=6489&#038;embed=true#?secret=ixXYV5IbYD#?secret=DX5q5sPXoM\" data-secret=\"DX5q5sPXoM\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u3051\u308c\u3069\u3082\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u6295\u7a3f\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306fGAS\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308bChatWorkClient\u306b\u306f\u5b58\u5728\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GAS\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u4e0a\u3067\u6295\u7a3f\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001ChatWorkClient\u3092\u4f7f\u308f\u305a\u306b\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u76f4\u63a5\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092GAS\u3067\u76f4\u63a5\u53e9\u304f\u306b\u306f\uff1f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Google Apps Script(GAS)\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u76f4\u63a5\u53e9\u304f\u306b\u306f\u3001UrlfetchApp\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306efetch\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GAS\u306ehttp\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u65b9\u6cd5\u306f\u4e0b\u8a18\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580 wp-block-embed-autoworker\u301cgoogle-apps-script-gas-\u3068sikuli\u3067\u59cb\u3081\u308b\u696d\u52d9\u6539\u5584\u5165\u9580\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"ys65rJrs6p\"><a href=\"https:\/\/auto-worker.com\/blog\/?p=2691\">GAS\u306b\u3088\u308bHTTP\u30ea\u30af\u30a8\u30b9\u30c8(GET\/POST)\u65b9\u6cd5\u3092\u89e3\u8aac!UrlFetchApp\u30af\u30e9\u30b9\u3067\u30d5\u30a7\u30c3\u30c1<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;GAS\u306b\u3088\u308bHTTP\u30ea\u30af\u30a8\u30b9\u30c8(GET\/POST)\u65b9\u6cd5\u3092\u89e3\u8aac!UrlFetchApp\u30af\u30e9\u30b9\u3067\u30d5\u30a7\u30c3\u30c1&#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=2691&#038;embed=true#?secret=Z44e4bfcpA#?secret=ys65rJrs6p\" data-secret=\"ys65rJrs6p\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306b\u306f\u64cd\u4f5c\u3057\u305f\u3044\u5185\u5bb9\u306b\u5fdc\u3058\u305f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3068\u306a\u308bURL\u3068\u3001API\u30c8\u30fc\u30af\u30f3\u3092\u542b\u3093\u3060\u30d8\u30c3\u30c0\u30fc\u60c5\u5831\u3092UrlfetchApp.fetch\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u7d50\u679c\u306fJSON\u5f62\u5f0f\u3067\u8fd4\u3063\u3066\u304f\u308b\u306e\u3067\u3001JSON.parse\u30e1\u30bd\u30c3\u30c9\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u3053\u3068\u3067\u3001GAS\u3067\u51e6\u7406\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u3059\u308b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306eURL\u306f\u4ee5\u4e0b\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/api.chatwork.com\/v2\/rooms\/{room_id}\/messages\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u4e2d\u3067\u53d6\u5f97\u3057\u305f\u3044\u30c1\u30e3\u30c3\u30c8\u306e\u30eb\u30fc\u30e0ID{room_id}\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">URL\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066force\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u3042\u308a\u30010\u307e\u305f\u306f1\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">0\u306e\u5834\u5408\u306f\u904e\u53bbAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3067\u53d6\u5f97\u6e08\u307f\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u53d6\u3089\u305a\u30011\u306e\u5834\u5408\u306f\u6bce\u56de\u6700\u65b0\u30e1\u30c3\u30bb\u30fc\u30b8\u3092100\u4ef6\u53d6\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u203b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6307\u5b9a\u3057\u306a\u3044\u5834\u5408\u306f\u300c?force=0\u300d\u3068\u3057\u3066\u51e6\u7406\u3055\u308c\u307e\u3059\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30921\u56de\u5b9f\u884c\u3059\u308b\u3068\u3001100\u4ef6\u3092\u4e0a\u9650\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u969b\u306b\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u304b\u3089\u30eb\u30fc\u30e0ID\u3092\u6307\u5b9a\u3057\u3066\u7279\u5b9a\u306e\u30c1\u30e3\u30c3\u30c8\u306b\u6295\u7a3f\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308bGoogle Apps Script(GAS)\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"614\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001.jpg\" alt=\"ChatWorkClient\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u305b\u305a\u306b\u3001Google Apps Script(GAS)\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306bUrlfetchApp.fetcch\u30e1\u30bd\u30c3\u30c9\u3067HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" class=\"wp-image-6506\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001-300x154.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001-1024x524.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001-768x393.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001-530x271.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001-565x289.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001-710x363.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_001-725x371.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function getChatWorkMessage(){\n  \/\/Chatwork API Token\u3092\u5b9a\u6570\u3068\u3057\u3066\u5b9a\u7fa9\n  const token = '********************************';\n  \/\/\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u305f\u3044\u30eb\u30fc\u30e0ID\u3092\u5b9a\u6570\u3068\u3057\u3066\u5b9a\u7fa9\n  const room_id ='+++++++++';\n  \/\/\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u5b9a\u7fa9\n  let messageUrl = 'https:\/\/api.chatwork.com\/v2\/rooms\/' + room_id + '\/messages?force=1';\n  \/\/API\u30ea\u30af\u30a8\u30b9\u30c8\u6642\u306b\u5fc5\u8981\u306aAPI\u30c8\u30fc\u30af\u30f3\u3092JSON\u5f62\u5f0f\u3067\u6307\u5b9a\n  let json = {\n    'x-chatworktoken': token\n  };\n  \/\/HTTP GET\u3092\u884c\u3046\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\n  let options = {\n    'method': 'get',\n    'headers' : json,\n  };\n  \/\/\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3001\u30eb\u30fc\u30e0ID\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\n  let response = JSON.parse(UrlFetchApp.fetch(messageUrl,options).getContentText());\n  \/\/\u53d6\u5f97\u3057\u305f\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u60c5\u5831\u3092\u30ed\u30b0\u51fa\u529b\n  console.log(response);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u3059\u308b\u969b\u306f\u3001ChatWorkClient\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u4f7f\u7528\u3057\u306a\u3044\u306e\u3067\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u8ffd\u52a0\u4f5c\u696d\u306f\u4e0d\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30c8\u30fc\u30af\u30f3\u3092\u5b9a\u7fa9(3\u884c\u76ee)\u3057\u3001\u7d9a\u3044\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u305f\u3044\u30c1\u30e3\u30c3\u30c8\u306e\u30eb\u30fc\u30e0ID\u3092\u5b9a\u7fa9\u3057\u307e\u3059(5\u884c\u76ee)\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d9a\u3044\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306b\u5148\u307b\u3069\u5b9a\u7fa9\u3057\u305f\u30eb\u30fc\u30e0ID\u3092\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5f8c\u306b\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u7528\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092UrlfetchApp.fetch\u30e1\u30bd\u30c3\u30c9\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u30ed\u30b0\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"700\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002.jpg\" alt=\"Google Apps Script(GAS)\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306bUrlfetchApp.fetcch\u30e1\u30bd\u30c3\u30c9\u3067\u76f4\u63a5HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u60c5\u5831\u304c\u30ed\u30b0\u51fa\u529b\" class=\"wp-image-6507\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002-300x175.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002-1024x597.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002-768x448.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002-530x309.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002-565x330.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002-710x414.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_002-725x423.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u30ed\u30b0\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u95a2\u3059\u308b\u60c5\u5831\u304c\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u30ea\u30af\u30a8\u30b9\u30c8\u3067JSON\u30a8\u30e9\u30fc\u304c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u524d\u8ff0\u3057\u305fGoogle Apps Script(GAS)\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u7d4c\u7531\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30a8\u30e9\u30fc\u304c\u751f\u3058\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"455\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003.jpg\" alt=\"Google Apps Script(GAS)\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306bUrlfetchApp.fetcch\u30e1\u30bd\u30c3\u30c9\u3067\u76f4\u63a5HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3001Syntax Error\u3067\u300cUnexpected end of JSON input\u300d\u304c\u51fa\u529b\" class=\"wp-image-6508\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003-300x171.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003-768x437.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003-530x301.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003-565x321.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003-710x404.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_003-725x412.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">SyntaxError\u306e\u539f\u56e0\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u8907\u6570\u56de\u5b9f\u884c\u3057\u3001ChatworkAPI\u3067\u53d6\u5f97\u3067\u304d\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u300c\/messages\u300d\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306f\u3001force\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u3042\u308a\u672a\u8a2d\u5b9a\u3060\u3068\u300cforce=0\u300d\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">force=0\u306e\u5834\u5408\u3001\u904e\u53bbAPI\u3067\u53d6\u5f97\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u53d6\u5f97\u5bfe\u8c61\u304b\u3089\u9664\u5916\u3055\u308c\u3001\u53d6\u5f97\u3067\u304d\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u306a\u304f\u306a\u308b\u305f\u3081\u3001API\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u5931\u6557\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u5834\u5408\u306fAPI\u306eURL\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u300c?force=1\u300d\u3092\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306b\u4ed8\u4e0e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"464\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006.jpg\" alt=\"\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u306eforce\u306b1\u3092\u8a2d\u5b9a\" class=\"wp-image-6513\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006-300x174.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006-768x445.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006-530x307.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006-565x328.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006-710x412.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_006-725x421.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u30a8\u30e9\u30fc\u306f\u89e3\u6d88\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c6\u30b9\u30c8\u306e\u305f\u3081\u4f55\u5ea6\u3082\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u5834\u5408\u306fforce=1\u3092URL\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u4ed8\u4e0e\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c1\u30e3\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u306b\u51fa\u529b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u524d\u8ff0\u3057\u305fGoogle Apps Script(GAS)\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u53e9\u3044\u3066\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u3057\u3001\u30ed\u30b0\u51fa\u529b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u304b\u3089API\u7d4c\u7531\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u305f\u3089\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u4fdd\u7ba1\u3057\u305f\u3044\u30cb\u30fc\u30ba\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u3053\u3067\u3001\u5148\u307b\u3069\u306eGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u6539\u826f\u3057\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u7d4c\u7531\u3067\u53d6\u5f97\u3057\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u8fbc\u3093\u3067\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"678\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004.jpg\" alt=\"\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092Google Apps Script(GAS)\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u3001\u30c1\u30e3\u30c3\u30c8\u306b\u6295\u7a3f\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u8fbc\u3080\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" class=\"wp-image-6509\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-300x170.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-1024x579.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-768x434.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-320x180.jpg 320w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-530x299.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-565x319.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-710x401.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_004-725x410.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">function getChatWorkMessage(){\n  \/\/Chatwork API Token\u3092\u5b9a\u6570\u3068\u3057\u3066\u5b9a\u7fa9\n  const token = '********************************';\n  \/\/\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u305f\u3044\u30eb\u30fc\u30e0ID\u3092\u5b9a\u6570\u3068\u3057\u3066\u5b9a\u7fa9\n  const room_id ='+++++++++';\n  \/\/\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u5b9a\u7fa9\n  let messageUrl = 'https:\/\/api.chatwork.com\/v2\/rooms\/' + room_id + '\/messages?force=1';\n  \/\/API\u30ea\u30af\u30a8\u30b9\u30c8\u6642\u306b\u5fc5\u8981\u306aAPI\u30c8\u30fc\u30af\u30f3\u3092JSON\u5f62\u5f0f\u3067\u6307\u5b9a\n  let json = {\n    'x-chatworktoken': token\n  };\n  \/\/HTTP GET\u3092\u884c\u3046\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\n  let options = {\n    'method': 'get',\n    'headers' : json,\n  };\n  \/\/\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3001\u30eb\u30fc\u30e0ID\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\n  let response = JSON.parse(UrlFetchApp.fetch(messageUrl,options).getContentText());\n  \/\/\u53d6\u5f97\u3057\u305f\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u60c5\u5831\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u51fa\u529b\u3067\u304d\u308b\u3088\u3046\u6574\u5f62\n  for(let i=0;i&lt;response.length;i++){\n    response[i] = [response[i].send_time, response[i].account.name, response[i].body];\n  }\n  \/\/\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b9\u30d7\u30ec\u30c3\u30c8\u30b7\u30fc\u30c8\u306e\u30b7\u30fc\u30c8\u8aad\u307f\u8fbc\u307f\n  const ss = SpreadsheetApp.getActiveSheet();\n  \/\/\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u6295\u7a3f\u65e5\u6642\u3001\u6295\u7a3f\u8005\u3001\u6295\u7a3f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\n  ss.getRange(2,1,response.length,response[0].length).setValues(response);\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">UrlfetchApp.fetch\u30e1\u30bd\u30c3\u30c9\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u7528\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u5f97\u305f\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u3046\u3061\u3001\u4ee5\u4e0b3\u3064\u30922\u6b21\u5143\u914d\u5217\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u6295\u7a3f\u6642\u9593<\/li><li>\u6295\u7a3f\u30e6\u30fc\u30b6\u30fc\u540d<\/li><li>\u6295\u7a3f\u30e1\u30c3\u30bb\u30fc\u30b8<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u8a18\u306e\u6295\u7a3f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u60c5\u5831\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u8fbc\u3080\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"418\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005.jpg\" alt=\"\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092Google Apps Script(GAS)\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u3001\u30c1\u30e3\u30c3\u30c8\u306b\u6295\u7a3f\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u66f8\u304d\u8fbc\u3080\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\" class=\"wp-image-6510\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005-300x157.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005-768x401.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005-530x277.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005-565x295.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005-710x371.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2022\/10\/20221006_auto_005-725x379.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6539\u826f\u7248\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u6295\u7a3f\u5c65\u6b74\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9a\u671f\u7684\u306b\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u6295\u7a3f\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u84c4\u7a4d\u3055\u308c\u3001\u904e\u53bb40\u65e5\u4ee5\u524d\u306e\u30c1\u30e3\u30c3\u30c8\u3082\u53c2\u7167\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u3001Google Apps Script(GAS)\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u3066\u3001\u7279\u5b9a\u30c1\u30e3\u30c3\u30c8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u5e38\u3001GAS\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001ChatWorkClient\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u307e\u3059\u304c\u3001\u6295\u7a3f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u53d6\u5f97\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092GAS\u3067\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u53d6\u5f97\u7528\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092UrlfetchApp.fetch\u30e1\u30bd\u30c3\u30c9\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c1\u30e3\u30c3\u30c8\u306b\u6295\u7a3f\u3055\u308c\u305f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3067\u304d\u308c\u3070\u3001\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u904e\u53bb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u4fdd\u7ba1\u3059\u308b\u30c4\u30fc\u30eb\u306a\u3069\u3082\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3067\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ed5\u4e8b\u3067\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u6d3b\u7528\u3057\u3066\u3044\u3066\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u4fdd\u5b58\u3057\u305f\u3044\u5834\u5408\u306fGAS\u3068\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u7d44\u307f\u5408\u308f\u305b\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u306fChatworkAPI\u304c\u7528\u610f\u3055\u308c\u3066\u304a\u308a\u3001API\u7d4c\u7531\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6295\u7a3f\u3057\u305f\u308a\u3001\u30c1\u30e3\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 Google Apps Script(GAS)\u3068\u30c1\u30e3\u30c3\u30c8\u30ef\u30fc\u30afAPI\u3092\u7d44\u307f\u5408\u308f\u305b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6507,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[14,1056,1057],"class_list":["post-6501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-gas","tag-gas","tag-api","tag-1057"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6501","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=6501"}],"version-history":[{"count":13,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6501\/revisions"}],"predecessor-version":[{"id":6535,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6501\/revisions\/6535"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/6507"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}