Post-process Templater file and update backlinks

Hi, fellow Obsidian lovers :slight_smile:

I’m using the obsidian-google-calendar plugin to create meetings by selecting a meeting from a calendar and triggering the template execution via Templater. That part works great, but when trying to get {{gEvent.attendees}}, they are inserted in a following format:

The plugin offers “.attendees[i].displayName”, but display name information doesn’t seem present.
I’ve even tried to get this data via the API

<%*
const event_id = "{{gEvent.id}}"; 
if (event_id) {
	const {getEvent} = this.app.plugins.plugins["google-calendar"].api;
	const theEvent = await getEvent(event_id);
} 
-%>

So I’m at the “plan B” right now, because I want to have backlinks to the individual attendees’ profiles. I thought I could store a property called “email” on each user document, then post-process this document to find those documents via this email property and replace emails in the current file with the matching document title or alias property. And this is where I’m struggling because my obsidian internal knowledge is too limited.

I know, that I need to delay execution for the file to be properly created. I plan to use something like:

setTimeout(() => { 
var file = app.workspace.getActiveFile()  

}, 200)

-%>

I would really appreciate some help figuring out how I can parse the document to get the list of the attendees, find a matching obsidian file, and then replace it in place to link to the file

To clarify, my biggest struggle is to find relevant files by property value. I think I’ll be able to fetch relevant information and replace it in the current file.