function doGet() { const url = "https://api.github.com/repos/imabari/rakuten_map/dispatches"; let data = { "event_type": "on-demand-test" }; let options = { "method": "POST", "headers": { "Authorization": "xxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json" }, "payload": JSON.stringify(data) }; UrlFetchApp.fetch(url, options); let output = HtmlService.createHtmlOutputFromFile('index'); return output.setTitle("楽天モバイル基地局マップ"); }
html作成「index.html」
<!DOCTYPE html> <html> <head> <base target="_top"> </head> <body> <p>マップを更新しました</p> </body> </html>
デプロイのウェブアプリでURLを作成
更新したいときは上のURLにアクセスすると更新できる