What if you could ask AI questions about invoices, unpaid bills, and financial records instead of searching through them manually?
That’s the idea behind my latest open-source contribution to Cognee Community: a QuickBooks Online data connector.
🔗 Pull Request: https://github.com/topoteretes/cognee-community/pull/402
📌 Issue: https://github.com/topoteretes/cognee/issues/4802
🧠 What does it do?
QuickBooks stores useful business information, but AI systems need a way to ingest and understand that data.
I worked on a connector that brings QuickBooks financial records into Cognee's AI memory workflow.
The connector supports:
- 📄 Ingesting invoices, vendor bills, and credit memos.
- 🔐 OAuth 2.0 authentication and token refresh.
- 🔄 Incremental sync to retrieve new and updated records.
- 🗑️ Deletion detection to help remove outdated information.
- 🛡️ Retry handling and safeguards against accidental deletion.
- 🧪 Automated tests and offline pipeline verification using DuckDB.
⚙️ How does it work?
The basic workflow is:
QuickBooks → Python Connector → DLT → Cognee → Knowledge Graph
The connector retrieves financial records, formats them into readable Markdown documents, and sends them through Cognee's ingestion workflow.
For example, instead of working with raw invoice JSON, the system can process information such as customer names, invoice totals, payment status, and line items.
This makes the information more useful for downstream AI search and knowledge extraction.
🔍 The biggest challenge: keeping data in sync
Fetching records is only one part of building a reliable connector.
What happens when an invoice changes? What if someone deletes a record? And what if an API request fails and returns no data?
I worked on incremental synchronization using Metadata.LastUpdatedTime, deletion detection through QuickBooks Change Data Capture (CDC), and a fallback reconciliation mechanism.
I also added a safety check to prevent an empty synchronization sweep from accidentally marking previously known records for deletion.
The submitted test suite documents 12 passing tests, covering data formatting, synchronization, deletion handling, and retry behavior.
💡 What I learned
This contribution taught me that building a data connector is about much more than calling an API.
You need to think about data consistency, authentication, synchronization state, failure handling, and testing edge cases.
Working on these details gave me practical experience with Python, REST APIs, DLT, data pipelines, testing, and AI knowledge graphs.
🙌 Explore the project
- My pull request: https://github.com/topoteretes/cognee-community/pull/402
- Original issue: https://github.com/topoteretes/cognee/issues/4802
- Cognee: https://github.com/topoteretes/cognee
- Cognee Community: https://github.com/topoteretes/cognee-community
Thanks to the Cognee maintainers and community for creating opportunities to learn and contribute to open-source AI infrastructure.
The pull request is currently open for review, and I welcome feedback from other developers.
Top comments (0)