Parsing Google Calendar event attendees in linked frontmatter

I’d like to be able to automatically import my calendar events, including the attendees of those events that can be linked to the various pages for each person on my team (and our customers). This will help me create clear meeting summaries and outline who is responsible for what and help me follow-up with various people to make sure things are on track.

I’m new to Obsidian but I’ve found the obsidian-google-calendar extension and configured it to automatically import my events for the day. I’m using templater to create a template for my gcal events to render on automatic import that follow’s Lila’s Frontmatter convention. And I’m using the dataview plugin to link the gcal notes that are created for each event and link it back to my daily agenda.

I’d like to be able to do the same thing for attendees but I’m running into two issues.

Issue 1: can not process {{gEvent.attendees}} object

First, I am unable to successfully process the gEvent.attendees object (is it an object?) and use that in any systematic way with templater. Any pointers for how I might do this better?

The relevant part of my google calendar import template looks like this:

`class:meta`
event-id:: {{gEvent.id}}
event-date:: <% event_date %>
location:: {{gEvent.location}}
attendees:: 
<%* 
const attendees = {{gEvent.attendees}};
/* I CAN'T EVEN GET TO THIS FOR LOOP BECAUSE I CAN'T ACCESS attendees OBJECT :(
for (let i=0;i<attendees.length;i++) {
  tR += "  - [[" + attendees[i].email + "]]";
} 
*/
-%>

The event-date is used successfully by a data query in my daily notes to create links from my daily notes to the individual event notes, but as soon as I start to try to parse the attendees I get a syntax error. Any suggestions for how to debug this?

The console does not have a very helpful message and it seems like the way I’m defining the attendees object is not working as I might expect.

Problem 2: automatically linking references

Even if I were able to get the template to render successfully, I can’t seem to figure out the right dataview query to be able to automatically link these notes to the people in my organization.

For example, if I have a notes doc that looks like this:

My event notes go here yippee

`class:meta`
attendees::
  - [[[email protected]]]
  - [[[email protected]]]

I’m unable to see a link to those notes automatically in Joe’s page, which might look something like this:

Joe Schmoe
---
aliases:
  - Joe
  - [email protected]
---

Meetings with Joe:
```dataview
LIST 
WHERE event-date
  AND attendees
  AND typeof(attendees) = "array"
  AND contains(attendees, [[Joe Schmoe]])

In particular, I notice that the event attendees reference to [email protected] does not get expanded to Joe Schmoe even though [email protected] is listed as an alias for that page.

Any tips out there?

@LilaRest I loathe myself for tagging you specifically, but I wonder if you’ve had any success with lists in YAML formatted frontmatter and being able to query those frontmatter lists in a dataview. :pray: