Skip to content

[BUG] "Skip existing notes" overwrites local changes when Granola document has been updated #48

@KierenB

Description

@KierenB

Describe the bug

The "Skip existing notes" setting does not fully protect existing notes from being overwritten. When a Granola document has a newer updated_at timestamp than the note's frontmatter, the plugin performs a full overwrite of the local file — ignoring the skipExistingNotes setting entirely.

To Reproduce

  1. Enable "Skip existing notes" in plugin settings
  2. Sync a Granola note to Obsidian and make local edits (e.g. add custom frontmatter, edit the body)
  3. Wait for Granola to update the source document (AI summary regeneration, attendee change, title edit, etc.)
  4. Trigger a sync (manual or auto)
  5. Local changes are overwritten

Expected behavior

When "Skip existing notes" is enabled, existing notes should never be overwritten, regardless of whether the Granola document has been updated. The setting description states: "notes that already exist will not be updated during sync. This preserves any manual tags, summaries, or other additions you've made."

Root cause

In main.js around line 1161, the skipExistingNotes guard calls isNoteOutdated(). If the note is outdated (i.e. Granola's updated_at is newer than the note's frontmatter), execution falls through to the full update block which calls vault.process() and overwrites the entire file. The skipExistingNotes check only skips when the note is already up-to-date — it does not protect against Granola-side updates.

There is a secondary trigger: isNoteOutdated() treats a note with no updated_at in its frontmatter as always outdated, meaning any such note will always be overwritten even with the setting enabled.

Plugin version

1.9.3

Additional context

This appears to affect any note that Granola has updated since last sync — which is common given Granola regenerates AI summaries and updates metadata after meetings. The setting name and description strongly imply full protection, so this behaviour is unexpected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions