Ok. I don’t know why but I think I got it fixed.
When I tried this originally from your script I had difficulty returning the location so I tweaked it and I was able to get the results I wanted - except for the additional header.
So this time I used your original template script but i had to add “id: props[0]” to the return and renumber the other items. I noticed the results included that extra value when i tested the powershell call to gcalcli.
<%*
function parseAgendaTsv(agenda) {
return agenda.split(“\n”).map(event => {
let props = event.split(“\t”)
// gcalcli handlers
return ({id: props[0],
startDate: props[1],
startTime: props[2],
endDate: props[3],
endTime: props[4],
calendarUrl: props[5],
notSure5: props[6],
conferenceType: props[7],
conferenceUrl: props[8],
title: props[9],
location: props[10],
description: props[11],
calendar: props[12],
meetingUrlOrLocation: props[6] == “video” ? props[7] : props[9],
raw: event,
})
})
}
i did need to filter the agenda for my calendar to remove the header.
agenda = agenda.filter((e,i) => e.calendar == “[email protected]” )