Created
November 16, 2023 12:48
-
-
Save gitryder/ad13e48d5b7511ce4f54750999a9aa41 to your computer and use it in GitHub Desktop.
Post data to a Google Sheet
This file contains 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 doPost(e) { | |
try { | |
const data = JSON.parse(e.postData.contents); | |
SpreadsheetApp.getActiveSheet().appendRow([ | |
data.id, | |
data.name | |
]); | |
return ContentService.createTextOutput(); | |
} catch (error) { | |
return ContentService.createTextOutput("Error"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment