Created
February 13, 2021 11:06
-
-
Save fromkk/0571bd55a923105bf16ec124b94de8a3 to your computer and use it in GitHub Desktop.
SMSのコードを返すGAS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet() { | |
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
const sheet = spreadsheet.getActiveSheet(); | |
const range = sheet.getRange("A2"); | |
const value = ('000000' + range.getValue()).slice(-6); | |
const out = ContentService.createTextOutput(); | |
out.setMimeType(ContentService.MimeType.JSON); | |
out.setContent(JSON.stringify({"code": value})); | |
return out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment