Closed bonelifer closed 2 years ago
Someone on Reddit r/GoogleAppsScript came up with a solution, it gets every line that has text and spits it out with a linebreak. It doesn't keep empty lines, but I can live with that.(original redditor noticed my comment here and addressed it) It completely replaces the function, parseMessage. I leave this here for anyone that needs it.
function parseMessage(lines) {
if (lines[0].toLowerCase().indexOf('cc:') != -1) {
var guests = lines[0].substring(3, lines[0].length)
var joinDescription = [];
for (var i = 1; i < lines.length; i++){
joinDescription.push(lines[i]);
var description = joinDescription.join("\n");
}
} else {
var guests = '';
var joinDescription = [];
for (var i = 0; i < lines.length; i++){
joinDescription.push(lines[i]);
var description = joinDescription.join("\n");
}
}
return [guests, description];
}
Thanks for this. I was having the same issue myself.
It would be nice to have multi-line descriptions. I often create doctors appointments with the Address +number, due to the fact I have to use a free disability transport and I need that info on hand when I make a pickup appointment with them. I can only make these pickup appointments 12 days in advanced(some of my appointments are more than a month out), so it would be nice to still have all that info in the description as I have been doing it manually.