Hello @muness
For now, with the help on github, I got it working, but I had to remove all emojies from my calendar. And your code works 
Template
<%*
function parseAgendaTsv(agenda) {
return agenda.split("\n").map(event => {
let props = event.split("\t")
// [gcalcli handlers](https://github.com/insanum/gcalcli/blob/master/gcalcli/details.py#L251-L259)
return ({startDate: props[0],
startTime: props[1],
endDate: props[2],
endTime: props[3],
calendarUrl: props[4],
notSure5: props[5],
conferenceType: props[6],
conferenceUrl: props[7],
title: props[8],
location: props[9],
description: props[10],
calendar: props[11],
meetingUrlOrLocation: props[6] == "video" ? props[7] : props[9],
raw: event,
})
})
}
let tsvAgenda = await tp.user.agenda2({from: tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YYYY/MM/DD"),to: tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY/MM/DD")})
agenda = parseAgendaTsv(tsvAgenda)
// filter the agenda as needed, e.g. for only the work calendar events:
//agenda = agenda.filter((e,i) => e.calendar == "<work calendar>" )
tR += agenda.map(e => { return `- [ ] ${e.startTime} ${e.title} ${e.meetingUrlOrLocation}`}).join('\n')
%>
User Function
powershell (C:/Users/adminuser/AppData/Local/Programs/Python/Python37-32/Scripts/gcalcli --nocolor agenda --details all --tsv --nodeclined %from% %to%)
However, @muness my calendar names seem to give errors. If I include ${e.calendar}, this is the result I get:
- [ ]undefined -- 00:00 Read 30 minutes
- [ ]undefined -- 00:00 Write 2x 30 minutes
etc
Here are the names of my calendar :
- 01 - ME meetings and events
- 02 - ME - time-blocking
- 03 - WORK - Meetings and events
- 04 - WORK - Time-blocking for activities work-related
Could you help me out with the syntax?
Ideally, I would like to be able to select/display all four calendars.