Introduction
It’s been a while since my last post in this series about syncing Obsidian notes to Notion using Python.
In the previous posts, I introduced scripts that can:
- Append content to existing pages (automatically copy Obsidian note content to Notion) ➡️ Link
- Create new pages in specific Notion databases (such as Tasks or Fleeting Notes) based on tags added in Obsidian) ➡️ Link
These covered the basic automation for adding or creating pages in Notion.
In this follow-up, I’ll share a smaller but practically useful improvement that enhances daily usability.
The theme this time is:
“Automatically finding and linking related Notion pages through relational properties.”
I use a Daily Journal database in Notion that automatically generates a new page each day, named using the format DD/MMM/YY.
This database acts as a central hub for each day’s notes — I jot down ideas directly in Notion, and as explained in the previous articles, my Obsidian notes are also synced here automatically.
However, I also maintain two other databases — Fleeting Notes and Task List — which are independent.
In my current setup, Obsidian notes tagged with ToTask or ToFleeting are not only appended to the Daily Journal but also added as individual pages in their respective databases.
To make daily review easier, I wanted these separate databases to be connected via Notion’s Relation property.
When done properly, all notes and tasks from the same day can be viewed in a single Daily Journal entry — like this:
📘 Daily Journal
├── 24/Oct/25
├── 23/Oct/25
│ └── 🔗 (Relation) Task: Remaining writing task
├── 22/Oct/25
├── 21/Oct/25
│ └── 🔗 (Relation) Fleeting: Idea for automatic tagging
│ └── 🔗 (Relation) Task: Review productivity tools
└── 20/Oct/25
With this structure, each Daily Journal page serves as a timeline view of all related notes and tasks created on that day.
Originally, I used to add these relations manually — but in this post, we’ll automate that process.
In short, the goal of this improvement is:
- When creating Task or Fleeting notes, automatically link them to the corresponding Daily Journal page via a Relation property.
As always, this post is based on my personal workflow, but the logic can easily be adapted to your own use case.
Once you understand how the script works, you can customize which databases and properties are linked.
Since the basic setup has already been covered in earlier posts, this article focuses specifically on the relation-handling improvements. If you’re new to this series, please check the earlier parts for setup details.
Implementation
1. Automatically identify the corresponding Daily Journal page by date
Each Obsidian note includes a UID (unique ID).
The script extracts the date from the first 8 digits of the filename (for example, 20251024) and searches for a Notion page whose title matches that date format (for example, 24/Oct/25).
dt_title = get_target_date_from_filename(fn)
daily_page_id = query_notion_page_by_title(DAILY_DB, dt_title)
This allows the script to determine which day the note belongs to.
2. Add a relation to the Daily Journal when creating notes in Fleeting or Task databases
If a Daily Journal page is found, its page ID is added to the “Daily Journal List” property (a Relation column in Notion).
relation_props = {
DAILY_RELATION_PROP: {"relation": [{"id": daily_page_id}]}
}
create_note(FLEETING_DB, title, mb, body, uid=uid, extra_properties=relation_props)
With this, Fleeting or Task pages are automatically linked to their corresponding Daily Journal page in Notion.
3. Add reverse relations to the Daily Journal (“Tasks” or “Fleeting Notes”)
After a new Task or Fleeting page is created, the script updates the corresponding Daily Journal page to include reverse links, achieving a full bidirectional relation.
Note that in Notion, the names of relational properties can differ between databases — so make sure to match them properly in your settings.
append_relation_to_page(daily_page_id, DAILY_TASKS_RELATION_PROP, task_page_id)
append_relation_to_page(daily_page_id, DAILY_FLEETING_RELATION_PROP, fleeting_page_id)
This allows each Daily Journal page to display all notes and tasks created on that date.
4. Example .env configuration
The property names must exactly match the labels in your Notion databases.
Here’s how I’ve set them up in my environment file:
DAILY_RELATION_PROP=Daily Journal List # Fleeting / Task → Daily
DAILY_TASKS_RELATION_PROP=Tasks # Daily → Task
DAILY_FLEETING_RELATION_PROP=Fleeting Notes # Daily → Fleeting
With this setup, simply tagging your Obsidian notes (for example, #ToTask or #ToFleeting) and saving them will automatically create new Notion pages that are fully linked to the correct Daily Journal — forming a seamlessly connected network of Daily Journals, Tasks, and Fleeting Notes.
Conclusion
This marks the third part of the series.
Since some time has passed since the last post, I focused only on the updated logic rather than the full code this time.
My workflow might be a bit niche, but I hope this post helps others who are building their own automation between Obsidian and Notion.
Once you understand the basic structure, you can easily modify the relation targets or extend the functionality for your own setup.
Thank you for reading! 🙌



Top comments (0)