4 ms·
Looks neat! Seems very limited though.. like you can't even insert multiple lines in one request?
by johtso 3y ago
Looks neat! Seems very limited though.. like you can't even insert multiple lines in one request?
- altbdoor 2y agoJust tried it out. The script is able to handle multiple commands (GET, POST, etc) in one go, but you will have to package the payload as an array. See https://github.com/ziolko/spreadapi/blob/master/spread-api.js#L57-L59 https://github.com/ziolko/spreadapi/blob/master/spread-api.j... As an example: curl -L \ --data '[{ "method": "POST", "sheet": "Sheet1", "payload": { "username": "John", "age": 25 } }, { "method": "GET", "sheet": "Sheet1" }]' \ "https://script.google.com/macros/s/$APP_ID/exec" A single curl request, that POSTs a user, and then GETs the data. So you can do multiple POSTs to add multiple rows too.