All plugins / gogoga Invoice Sync

gogoga Invoice Sync

Sync e-invoices from a dedicated mailbox into notes, parsing the official XML.

v0.2.0Not in directoryMIT

Install

  1. Download gogoga-invoice-sync-0.2.0.zip (1.0 MB) and unzip it to get the gogoga-invoice-sync folder.
  2. Open your vault's folder and move gogoga-invoice-sync into .obsidian/plugins/ (create it if missing).
  3. Restart Obsidian, turn off Restricted mode in Settings → Community plugins, and enable gogoga Invoice Sync.

<vault>/.obsidian/plugins/gogoga-invoice-sync/main.js

.obsidian is hidden. On macOS press ⌘ ⇧ . in Finder; on Windows tick "Hidden items" under View. For phones see the install guide.

Sync e-invoices from a dedicated invoice IMAP mailbox (163 Mail by default) into Obsidian notes. The plugin parses the national-standard XML of fully digital e-invoices (数电票). When an email has no attachment, it follows the download link in the email body. The original PDF, OFD, and XML files are archived in your vault, and the plugin generates an invoice overview table with Bases. Desktop only.

The interface follows Obsidian's language setting: English, or Simplified Chinese when Obsidian is set to Chinese. Generated invoice notes and the overview table keep Chinese property names.

Usage

  1. In settings, enter your Email address. Under Authorization code, pick or create a secret and paste your IMAP authorization code into it; it is kept in the system keychain. In 163 Mail, enable IMAP and generate the code under 设置 → POP3/SMTP/IMAP (Settings → POP3/SMTP/IMAP). Test connection checks the login without reading any email.
  2. Run Sync invoice mailbox from the command palette, or open the invoice panel in the sidebar and select Sync.
  3. Use Open invoice overview to see all invoices, and Toggle reimbursement status of current invoice to mark an invoice as reimbursed in its note.

You can also drop XML or ZIP files into invoices/import/. They're imported automatically on the next sync.

Output locations (all configurable in settings):

  • Notes: invoices/{year}/{month}/{date} {seller} {total}.md
  • Original files: attachments/invoices/{year}/
  • Overview table: invoices/发票总表.base

The area between %% invoice-sync:start/end %% in a note is managed by the plugin. Content outside the markers is never rewritten.

Network and privacy

  • IMAP: Connects directly to the mail server you configure in settings (default imap.163.com:993, TLS). It only reads email, and never deletes or sends any.
  • Invoice download links: When an email has no XML attachment, the plugin visits the invoicing platform link in the email body (following short-link redirects) to download the XML, PDF, or OFD file.
  • The authorization code is stored in Obsidian's SecretStorage (the system keychain), and is never written to data.json, which syncs with your vault.
  • No large language models or third-party relay services are used, and there is no telemetry.

Changelog

0.2.0
2026-10-15

Added

  • English and Simplified Chinese interface, following Obsidian's language.
  • English README with a Simplified Chinese translation.
0.1.0
2026-10-14

First public release.

Added

  • Syncs e-invoices from a dedicated IMAP mailbox (163 Mail by default) into notes. Mail is only read, never deleted or sent. Desktop only.
  • Parses the national-standard invoice XML, follows download links in the mail body when there is no attachment, and reads PDFs that have a text layer.
  • Archives the original PDF / OFD / XML files and generates a Bases table of all invoices.
  • A command to toggle the reimbursement status; XML / ZIP files dropped into invoices/import/ are imported.
  • The mailbox password is kept in the system keychain, not in the synced data.json.