Getting calendar events into my Obsidian Daily note
Overview
In this tutorial, we will demonstrate how to integrate your Outlook calendar events into Obsidian daily notes using Make and the Templater plugin. This powerful combination allows you to automatically populate your daily notes with meeting details and provides an efficient way to manage your schedule and notes all in one place
Flow
How to recreate this automation
Resources
Step 1: Create a Make.com Scenario
- Log in to your Make.com account and create a new scenario.
- Add a Webhook module with a Custom Webhook.
- Name the webhook and add any necessary security measures, then copy the unique URL provided.
Step 2: Set up the Outlook Calendar Connection
- In the Make.com scenario, add a Microsoft 365 Calendar module and choose the API call option.
- Configure the API call using the date parameter passed from the webhook, adjusting the time zone if necessary.
Step 3: Transform the Data to JSON
- Add a JSON module to the scenario and choose the "Transform to JSON" option.
- Select the body returned from the previous step as the object to transform.
Step 4: Create a Webhook Response
- Add a Webhook Response module to the scenario and set the status to 200.
- In the body, use the JSON string created in the previous step.
- Save the scenario and run it once to test the setup.
Step 5: Configure the Templater Plugin in Obsidian
- Install the Templater plugin in Obsidian and create a new template.
- In the template, write the code to call the Make.com webhook, ignore specified subjects, and output the events as Markdown text.
- Save the template in a designated folder in Obsidian. Here is the code we used for our Templater plugin.
1<%* 2async function getDataFromAPI() { 3 4const ignoredSubjects = ['SR', 'Standup/Knowledge Share', 'Review Day/Write up notes', 'Friday Afternoon Internal Meeting Free Zone']; 5var ret = '' 6 7try { 8 const dateToRequest = tp.file.title; 9 const response = await fetch('https://hook.eu1.make.com/12345678?date=' + dateToRequest); 10 11 const data = await response.json(); 12 13 console.log('returned data') 14 data.map((item) => { 15 if (!ignoredSubjects.includes(item.subject)) { 16 const line = '### ' + item.subject; 17 console.log(line); 18 ret += line + '\n' + '\n'; 19 } 20 }); 21} catch (error) { 22 console.error(error); 23} 24 25return ret; 26 27} 28 29tR += await getDataFromAPI(); 30%>
Step 6: Integrate the Templater Template into Daily Notes
- In your Obsidian daily note template, add the code tp.file.Include followed by the name of the Templater template created in Step 5.
- This will ensure that the calendar events are imported each time a new daily note is created.
With this setup, your Outlook calendar events will be dynamically imported into your Obsidian daily notes, allowing you to easily manage your schedule and meeting notes in one place. This method can also be adapted to integrate other APIs or personal data using Make.com or similar automation platforms.