{"id":4341,"date":"2021-09-19T22:28:17","date_gmt":"2021-09-19T13:28:17","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=4341"},"modified":"2021-09-19T22:28:17","modified_gmt":"2021-09-19T13:28:17","slug":"post-4341","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=4341","title":{"rendered":"GAS\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u5909\u66f4\u30fb\u524a\u9664\u3059\u308b\u65b9\u6cd5\uff01\u4ef6\u540d\u3084\u958b\u59cb\u65e5\u30fb\u7d42\u4e86\u65e5(\u6642\u9593)\u3092\u4fee\u6b63"},"content":{"rendered":"<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3092Google Apps Script\u3067\u64cd\u4f5c\u3059\u308b\u969b\u306b\u3001\u3059\u3067\u306b\u4f5c\u6210\u6e08\u307f\u306e\u4e88\u5b9a\u306e\u4ef6\u540d\u3084\u4e88\u5b9a\u6642\u9593\u3092\u5909\u66f4\u3057\u305f\u308a\u3001\u524a\u9664\u3059\u308b\u3084\u308a\u65b9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3068Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u9023\u643a\u3057\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u5074\u3092\u4fee\u6b63\u3057\u305f\u969b\u306bGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u3082\u4fee\u6b63\u3092\u53cd\u6620\u3055\u305b\u305f\u3044\u5834\u5408\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<h2>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3068\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u9023\u643a<\/h2>\n<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3068\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u9023\u643a\u3055\u305b\u305f\u3044\u30e6\u30fc\u30b6\u30fc\u306f\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306f\u30ab\u30ec\u30f3\u30c0\u30fc\u5f62\u5f0f\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u7ba1\u7406\u304c\u3057\u3084\u3059\u3044\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u9032\u6357\u7ba1\u7406\u306e\u5834\u5408\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u3088\u3046\u306b\u8868\u5f62\u5f0f\u306e\u65b9\u304c\u4e00\u89a7\u6027\u304c\u3042\u308a\u3001\u6761\u4ef6\u306b\u5fdc\u3058\u305f\u30d5\u30a3\u30eb\u30bf\u30fb\u30bd\u30fc\u30c8\u304c\u3067\u304d\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3068\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u4e21\u65b9\u3067\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u304c\u3001\u4e21\u65b9\u624b\u52d5\u3067\u64cd\u4f5c\u3059\u308b\u306e\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u4e0a\u3067\u5909\u66f4\u3057\u305f\u5185\u5bb9\u304cGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u3082\u53cd\u6620\u3055\u308c\u3001\u4e88\u5b9a\u304c\u81ea\u52d5\u7684\u306b\u4fee\u6b63\u3055\u308c\u308b\u3068\u8ca0\u62c5\u304c\u8efd\u6e1b\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>GAS\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u5909\u66f4\u65b9\u6cd5<\/h2>\n<p>Google Apps Script(GAS)\u306b\u306f\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u4e0a\u306b\u4f5c\u6210\u6e08\u307f\u306e\u4e88\u5b9a\u5185\u5bb9\u3092\u5909\u66f4\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5909\u66f4\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u4e88\u5b9a\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u5404\u8981\u7d20\u3054\u3068\u306bset\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3067\u4e3b\u8981\u306a3\u3064\u306e\u8981\u7d20\u3092\u5909\u66f4\u3059\u308bGAS\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li>\u4ef6\u540d\u306e\u5909\u66f4\uff1a<em><strong>Event.setTitle(&#8216;\u5909\u66f4\u3057\u305f\u3044\u30bf\u30a4\u30c8\u30eb&#8217;)<\/strong><\/em><\/li>\n<li>\u6642\u9593\u306e\u5909\u66f4\uff1a<em><strong>Event.setTime(&#8216;\u958b\u59cb\u65e5&#8217;, &#8216;\u7d42\u4e86\u65e5&#8217;)<\/strong><\/em><\/li>\n<li>\u8aac\u660e\u306e\u5909\u66f4\uff1a<em><strong>Event.setDescription(&#8216;\u4e88\u5b9a\u306e\u8aac\u660e&#8217;)<\/strong><\/em><\/li>\n<\/ol>\n<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u53d6\u5f97\u3057\u305f\u4e88\u5b9a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3057\u3001\u4e0a\u8a18\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ef6\u540d\u3084\u958b\u59cb\u65e5\uff0f\u7d42\u4e86\u65e5\u3001\u8aac\u660e\u304c\u4e0a\u66f8\u304d\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u306b\u3088\u3063\u3066\u3001Google Apps Script\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u3059\u3067\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u4e88\u5b9a\u3092\u5909\u66f4\u30fb\u4fee\u6b63\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u4e88\u5b9a\u3092\u5909\u66f4\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n<p>\u5b9f\u969b\u306bGoogle Apps Script\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3067\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u4e88\u5b9a\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4342\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001.jpg\" alt=\"Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3067\u8d64\u67a0\u90e8\u5206\u306e\u4e88\u5b9a\u3092GAS\u304b\u3089\u5909\u66f4\u3059\u308b\" width=\"800\" height=\"408\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-300x153.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-768x392.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-530x270.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-565x288.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-710x362.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-725x370.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>\u4eca\u56de\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u3042\u308b\u8d64\u67a0\u306e\u300cGAS\u30a4\u30d9\u30f3\u30c8\u767b\u9332\u300d\u3068\u3044\u3046\u4e88\u5b9a\u306e\u4ef6\u540d\u3068\u3001\u958b\u59cb\u65e5\uff0f\u7d42\u4e86\u65e5\u3092\u5909\u66f4\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u5909\u66f4\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4343\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002.jpg\" alt=\"Google Apps Script(GAS)\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u5b58\u5728\u3059\u308b\u4e88\u5b9a\u3092\u5909\u66f4\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" width=\"1200\" height=\"606\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002-300x152.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002-768x388.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002-1024x517.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002-530x268.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002-565x285.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002-710x359.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_002-725x366.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><code>function modifyCalenderEvent() {<br \/>\n\/\/\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u30ab\u30ec\u30f3\u30c0\u30fc\u306eID\u3092\u6307\u5b9a\u3057\u3066\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u53d6\u5f97\u3059\u308b<br \/>\nlet myCalendar = CalendarApp.getCalendarById('***********@gmail.com');<br \/>\n\/\/Google\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u53d6\u5f97\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u306e\u958b\u59cb\u65e5(\u4eca\u65e5)\u3092\u8a2d\u5b9a\u3059\u308b<br \/>\nlet startDate = new Date();<br \/>\n\/\/Google\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u53d6\u5f97\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u306e\u7d42\u4e86\u65e5(1\u9031\u9593\u5f8c)\u3092\u8a2d\u5b9a\u3059\u308b<br \/>\nlet endDate = new Date();<br \/>\nendDate.setDate(startDate.getDate() + 7);<br \/>\n\/\/\u958b\u59cb\u65e5\uff5e\u7d42\u4e86\u65e5\u306b\u5b58\u5728\u3059\u308bGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3059\u308b<br \/>\nlet myEvent = myCalendar.getEvents(startDate, endDate);<br \/>\n\/\/\u53d6\u5f97\u3057\u305f1\u3064\u76ee\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u4ef6\u540d\u3092\u5909\u66f4\u3059\u308b<br \/>\nmyEvent[0].setTitle(\"GAS\u4ef6\u540d\u5909\u66f4\");<br \/>\n\/\/\u53d6\u5f97\u3057\u305f1\u3064\u76ee\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u6642\u523b\u30921\u9031\u9593\u5f8c\u306b\u5909\u66f4\u3059\u308b<br \/>\nmyEvent[0].setTime(endDate,endDate);<br \/>\n}<\/code><\/p>\n<p>\u307e\u305a\u3001\u53d6\u5f97\u3057\u305f\u3044Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306eID\u3092\u53d6\u5f97\u3057\u305f\u4e0a\u3067\u3001\u6307\u5b9a\u3057\u305f\u671f\u9593\u306b\u5b58\u5728\u3059\u308b\u3059\u3079\u3066\u306e\u30a4\u30d9\u30f3\u30c8\u309210\u884c\u76ee\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>\u203bGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u53d6\u5f97\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3082\u4f75\u305b\u3066\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"dLCT6SWvGh\"><p><a href=\"https:\/\/auto-worker.com\/blog\/?p=4323\">GAS\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff01\u6307\u5b9a\u671f\u9593\u5185\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u62bd\u51fa<\/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;GAS\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff01\u6307\u5b9a\u671f\u9593\u5185\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u62bd\u51fa&#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=4323&#038;embed=true#?secret=M1BcJl0EHU#?secret=dLCT6SWvGh\" data-secret=\"dLCT6SWvGh\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u305d\u306e\u5f8c\u3001setTitle\u3067\u4ef6\u540d\u3092\u5909\u66f4\u3057\u3001setTime\u3067\u958b\u59cb\u65e5\u3068\u7d42\u4e86\u65e5\u3092\u5b9f\u884c\u3057\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4344\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003.jpg\" alt=\"Google Apps Script\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u5909\u66f4\u3057\u305f\u3068\u3053\u308d\u3001\u4e88\u5b9a\u306e\u4ef6\u540d\u3068\u6642\u9593\u304c\u5909\u66f4\u3055\u308c\u305f\" width=\"800\" height=\"407\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003-300x153.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003-768x391.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003-530x270.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003-565x287.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003-710x361.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_003-725x369.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>GAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u304c\u79fb\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ef6\u540d\u306b\u3064\u3044\u3066\u3082GAS\u306esetTitle\u306b\u8a2d\u5b9a\u3055\u308c\u305f\u3082\u306e\u306b\u7f6e\u304d\u63db\u308f\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u524a\u9664\u306fdeleteEvent<\/h2>\n<p>\u7d9a\u3044\u3066Google Apps Script\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u524a\u9664\u3059\u308b\u5834\u5408\u3001deleteEvent\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p><em><strong>Event.deleteEvent()<\/strong><\/em><\/p>\n<p>deleteEvent\u306f\u5f15\u6570\u4e0d\u8981\u3067\u3001\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092GAS\u3067\u524a\u9664\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u4e88\u5b9a\u3092\u524a\u9664\u3059\u308bGAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<\/h2>\n<p>\u5148\u7a0b\u306e\u4e88\u5b9a\u5909\u66f4\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u8d64\u67a0\u90e8\u5206\u306eGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u524a\u9664\u3059\u308b\u624b\u9806\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4342\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001.jpg\" alt=\"Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3067\u8d64\u67a0\u90e8\u5206\u306e\u4e88\u5b9a\u3092GAS\u304b\u3089\u5909\u66f4\u3059\u308b\" width=\"800\" height=\"408\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-300x153.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-768x392.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-530x270.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-565x288.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-710x362.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_001-725x370.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u53d6\u5f97\u3057\u305f1\u3064\u76ee\u306e\u4e88\u5b9a\u3092\u524a\u9664\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4345\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004.jpg\" alt=\"Google Apps Script(GAS)\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u524a\u9664\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" width=\"1200\" height=\"600\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004-300x150.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004-768x384.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004-1024x512.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004-530x265.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004-565x283.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004-710x355.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_004-725x363.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><code>function delCalenderEvent() {<br \/>\n\/\/\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u30ab\u30ec\u30f3\u30c0\u30fc\u306eID\u3092\u6307\u5b9a\u3057\u3066\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u53d6\u5f97\u3059\u308b<br \/>\nlet myCalendar = CalendarApp.getCalendarById('gasworkproject@gmail.com');<br \/>\n\/\/Google\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u53d6\u5f97\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u306e\u958b\u59cb\u65e5(\u4eca\u65e5)\u3092\u8a2d\u5b9a\u3059\u308b<br \/>\nlet startDate = new Date();<br \/>\n\/\/Google\u30ab\u30ec\u30f3\u30c0\u30fc\u304b\u3089\u53d6\u5f97\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u306e\u7d42\u4e86\u65e5(1\u9031\u9593\u5f8c)\u3092\u8a2d\u5b9a\u3059\u308b<br \/>\nlet endDate = new Date();<br \/>\nendDate.setDate(startDate.getDate() + 7);<br \/>\n\/\/\u958b\u59cb\u65e5\uff5e\u7d42\u4e86\u65e5\u306b\u5b58\u5728\u3059\u308bGoogle\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3059\u308b<br \/>\nlet myEvent = myCalendar.getEvents(startDate, endDate);<br \/>\n\/\/\u53d6\u5f97\u3057\u305f1\u3064\u76ee\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u4ef6\u540d\u3092\u524a\u9664\u3059\u308b<br \/>\nmyEvent[0].deleteEvent();<br \/>\n}<\/code><\/p>\n<p>\u4e88\u5b9a\u5909\u66f4\u3068\u307b\u3068\u3093\u3069\u5185\u5bb9\u306f\u540c\u3058\u3067\u3059\u304c\u300112\u884c\u76ee\u306bdeleteEvent()\u30e1\u30bd\u30c3\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4346\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005.jpg\" alt=\"Google Apps Script(GAS)\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u524a\u9664\u3057\u305f\u7d50\u679c\" width=\"1200\" height=\"609\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005.jpg 1200w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005-300x152.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005-768x390.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005-1024x520.jpg 1024w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005-530x269.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005-565x287.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005-710x360.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2021\/09\/20210919_auto_005-725x368.jpg 725w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>GAS\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u30019\u670820\u65e5\u306b\u5b58\u5728\u3057\u3066\u3044\u305f\u4e88\u5b9a\u304c\u524a\u9664\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n<p>\u4eca\u56de\u3001Google Apps Script(GAS)\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u3092\u5909\u66f4(\u4fee\u6b63)\u3001\u524a\u9664\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u5909\u66f4\u306fGAS\u306b\u3042\u308bset\u30e1\u30bd\u30c3\u30c9\u3092\u5229\u7528\u3057\u3001setTitle\u3067\u4ef6\u540d\u3001setTime\u3067\u6642\u9593\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4e88\u5b9a\u3092\u524a\u9664\u3057\u305f\u3044\u5834\u5408\u306f\u3001deleteEvent\u30e1\u30bd\u30c3\u30c9\u3067\u5b9f\u884c\u53ef\u80fd\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4e88\u5b9a\u306e\u4fee\u6b63\u3084\u524a\u9664\u304c\u3067\u304d\u308b\u3068\u3001Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3068\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u81ea\u52d5\u9023\u643a\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u5909\u66f4\u3059\u308b\u3068Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3082\u53cd\u6620\u3055\u308c\u308b\u3088\u3046\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4e8c\u91cd\u7ba1\u7406\u306e\u8ca0\u62c5\u304c\u89e3\u6d88\u3067\u304d\u3001\u696d\u52d9\u52b9\u7387\u5316\u306b\u3082\u306a\u308b\u306e\u3067\u3001\u305c\u3072Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u4e88\u5b9a\u5909\u66f4\u30fb\u524a\u9664\u3092\u30de\u30b9\u30bf\u30fc\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3092Google Apps Script\u3067\u64cd\u4f5c\u3059\u308b\u969b\u306b\u3001\u3059\u3067\u306b\u4f5c\u6210\u6e08\u307f\u306e\u4e88\u5b9a\u306e\u4ef6\u540d\u3084\u4e88\u5b9a\u6642\u9593\u3092\u5909\u66f4\u3057\u305f\u308a\u3001\u524a\u9664\u3059\u308b\u3084\u308a\u65b9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002 \u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3068Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u9023\u643a\u3057\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4343,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[14,556,152,759],"class_list":["post-4341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gas","tag-gas","tag-google","tag-152","tag-759"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4341","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=4341"}],"version-history":[{"count":3,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4341\/revisions"}],"predecessor-version":[{"id":4349,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4341\/revisions\/4349"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/4343"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}