Greetings from the dystopia of nested backslashes. I hope to save you some trouble even if I myself am not fully free of it.
Many Monday posts exist; however translating them into something executable for Google Apps script has not been obvious, which is unfortunate because Google Script is among the most accessible ways for casual users to leverage the Monday API for small tasks. Getting started is as easy as typing script.new into your browser address bar and following the prompts.
Key insights thus far on Monday / Google Sheets integration:
- Across Monday boards, Column IDs vary for the exact same Column Name. No fetchColIDFromName kind of function exists; thus you’ll need to loop all columns and match on the expected name. The code block is not rendering properly in this venue, so please see getColIDFromName here
- Google Apps Script expects the word “payload” instead of “body” (see working examples at mondayintegration/monday.gs at main · bridge2ai/mondayintegration · GitHub)
- passing in \\"true\\" for checking boxes works fine; however passing in \\"false\\" fails silently along with 13 other permutations of blank or null. 2 additional options trigger fatal errors.
// all of these fail silently (they do not change state of checkbox to true, but they don't throw errors either)
var silentFailParameters = [
null,
false,
'false',
'\\"false\\"',
'\\\\"false\\\\"',
'\\\\\\"false\\\\\\"',
'"{}"',
'\\"{}\\"',
'\\\\"{}\\\\"',
'\\\\\\"{}\\\\\\"',
'\\\\\\"\\\\\\"'
];
var fatalErrorParameters = [
"",
{}
];
I’m what am I missing?
thanks in advance,
Julie