3 ms·
Just 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:/
by altbdoor 2y ago
Just 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.