---
title: "How Inbox Zero uses Tinybird for real-time analytics"
excerpt: "Here's how we use Tinybird at Inbox Zero to power both our own internal product analytics and user-facing, real-time dashboards. "
authors: "Elie Steinbock"
categories: "I Built This!"
createdOn: "2025-04-03 00:00:00"
publishedOn: "2025-04-04 00:00:00"
updatedOn: "2025-04-04 00:00:00"
status: "published"
---

<p><a href="https://getinboxzero.com"><u>Inbox Zero</u></a> is an open-source AI personal assistant for email that helps users achieve inbox zero quickly and efficiently. Our platform, which is fully open source, leverages AI to automate email management tasks and help users regain control of their inbox. In this post, I'll explore how we use Tinybird to power both our internal analytics and user-facing dashboards for over 10,000 users.</p><h2 id="what-is-inbox-zero">What is Inbox Zero?</h2><p>Before diving into the analytics, allow me to quickly introduce Inbox Zero. Our platform serves as an AI email assistant that helps users:</p><ul><li>Process and archive emails efficiently</li><li>Automate email responses</li><li>Manage email workflows intelligently</li><li>Track email processing and AI usage</li></ul><p>Being open source, we believe in transparency not just in our code but also in how we handle and present analytics to our users.</p><h2 id="dual-purpose-analytics-architecture">Dual-purpose analytics architecture</h2><p>Our analytics system, built on Tinybird, serves two crucial purposes:</p><ol><li>Internal platform insights and monitoring</li><li>User-facing dashboards and usage tracking</li></ol><h3 id="data-collection">Data collection</h3><p>The core of our analytics implementation uses the <code>aiCall</code> data source to track every AI interaction:</p>
<!--kg-card-begin: html-->
<iframe width="100%" src="https://snippets.tinybird.co/XQAAAAI7AQAAAAAAAABBKUqGk9nLKvkUNWmCG218CeMw54gFJ9vuPP0U1mhavaQpHiRv-VsIoywS_MyZpxV_HHsHzBfDLi9_V3y32NFhH38w-q1zL6ltUHlkWUXB2NYe0p4Hoen6aLKkOB_XPCuqKL-DSVeoH5vVQIz88m7CmYFy2PtM3NEfGQA2h9NxmSh5bL5pKilHn3I7xaXRzCpMdJWbjMd5sC3D_JnB0O7CHZvbmZafyTSCTE0U50eifbWQFBDigUazSPn0v__d7S8g/embed"></iframe>
<!--kg-card-end: html-->
<p>This schema enables us to track both system-wide metrics and individual user statistics. You can check out <a href="https://www.tinybird.co/blog-posts/instrument-your-llm-calls"><u>Tinybird's blog post on instrumenting your AI apps</u></a> for more resources on this.</p><h2 id="user-facing-analytics">User-facing analytics</h2><p>One of the most powerful features of our Tinybird implementation is how it powers our user dashboards. Thanks to Tinybird's exceptional performance, we can provide real-time analytics to our users with minimal latency.</p><h3 id="personal-usage-dashboard">Personal usage dashboard</h3><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeVg2DULXth09FAkpGKJJUA6QJybPF_V1YpA8crFLR6CEYFfVwEcijHwS0Wv9SMpkgCDkuyZHzcnNKWFyCz_ul-N5jZI4lEWuCM8iP2tmsajBMxby1Q0ynTObW7aFuaOvGCOnPFYg?key=b5kzRS-kGrTzty0YNepbA65o" class="kg-image" alt="A screenshot of an Inbox Zero dashboard showing email metrics calculated from LLM calls" loading="lazy" width="2048" height="1184"><figcaption><span style="white-space: pre-wrap;">One of the user-facing dashboards we build using Tinybird APIs</span></figcaption></figure><p>Users can see:</p><ul><li>Total emails processed by our AI</li><li>Number of emails archived</li><li>Various email actions taken (replies, categorizations, etc.)</li><li>AI usage metrics (especially important for users with their own API keys)</li></ul><p>Here's an example of how we query this data:</p>
<!--kg-card-begin: html-->
<iframe width="100%" src="https://snippets.tinybird.co/XQAAAAJgAQAAAAAAAABBKUqGk9nLKvK_vMbH2LTjseB7qVNDbrGXuDtZzjdfftzGBhB-vGE--lhm1aK7noUENrnu9Squ4yLf-5LZ9TBSqP30Xsn-kcoz2WHD2xD3JBjf-vNioAl0v000-9GEEwN2O5QpVIDYCZT_01Mly8kEFdbZareTYtoZcLnEkv2-EkO1N7M1xFUrlTaR5LfwvohM5IUfvv5_XxNVNGRjjtZ1WxCh2yaw_qbNmt0t7xNuqGeBVnFgjIF-G992WZaKXuyp7d3I4Vfq_mJY7iUkxZNTrLImAA6KICEL3fhDpYtDxG_lOVDTcdbuDUr5NVA2OnlIAT0gmf8YvpwA/embed"></iframe>
<!--kg-card-end: html-->
<h3 id="usage-monitoring-for-api-key-users">Usage monitoring for API key users</h3><p>For users who provide their own API keys, we offer detailed cost and usage tracking:</p>
<!--kg-card-begin: html-->
<iframe width="100%" src="https://snippets.tinybird.co/XQAAAAIbAQAAAAAAAABBKUqGk9nLKvEmGU3VBhIrShFTh25ZVnQxgpucSd6UGAQX6X8qAjz2bCc3DHbqM3ydjWqGKm1Epsa_SQ862g2mHuklq8mT2uoB_eh-BMDBOuw0pwk3QzTRonIjQstOUFGUX2Xc9XVrC76a8JfI0oth5EfE7yarLzRymUUM1RxyaiEidHCDUmUhL7W-wAW1QO5-zbmFmr5u-4dBSgkq-mF8Q86Svuk7C-B8b_0uWAgp5Ps0cDG6YgIqMBIcHeqsqX6bwEcOqv6GsDDaabpFpTCahPLOiIoH7a8_2KWofnsQDv8WxEqy2bDDEEqLBuP_DocAAA/embed"></iframe>
<!--kg-card-end: html-->
<p>This transparency helps users monitor their API usage and costs in real-time.</p><h2 id="internal-platform-insights">Internal platform insights</h2><p>While serving user-facing analytics, we simultaneously use the same data structure for internal monitoring:</p><h3 id="system-wide-metrics">System-wide metrics</h3><p>For example, here's how we track overall usage:</p>
<!--kg-card-begin: html-->
<iframe width="100%" src="https://snippets.tinybird.co/XQAAAAL8AAAAAAAAAABBKUqGk9nLKwj8_Sfg4Mpm3IEEg-IT_k2iFHqha2C3FCwE3X-Z37KZhFs9BcAgCffhTlKDk6bn_Y-U0QsnmejlEXizcOr1AOnmfJ3L7cJbMGy5thVxuz8zqRGK9okOmzqVMZH1vW0xTjudQVYZdZLePDZDuR5mHUX3bYjFLChnYmPlbH6L9CrcoqB1rJbgqdZT_P5jTmer9zp7qbPyw3tDPo2UsUyjYMBKAJAXVi0z-GvFDQZZoj_ELl4X1jrGgWau4SMssbM4KHOWkZPb1OSa2pH_7pHigA/embed"></iframe>
<!--kg-card-end: html-->
<h3 id="feature-adoption-tracking">Feature adoption tracking</h3><p>And how we monitor feature adoption, grouping calls and users by <code>label</code>:</p>
<!--kg-card-begin: html-->
<iframe width="100%" src="https://snippets.tinybird.co/XQAAAALbAAAAAAAAAABBKUqGk9nLKveCp11rYOHpKyW8SNPmhwVq5EsBIbRHu8dZS-juXteLgrgUsmg82VcgaSqdtuo2P1D_16mcfFgE9XsU6NBsllhaEQk7AisFxApVNNg7f_QE3dDrG6wGA3XOJTxBCWZAl8i9V5lQAPX21r1wWwA_6F_9MDcvA8byB0DYaS4DZcjEEn8FBLJcounHpZyXr2Cu2FS3_bvRKFUKsT0LGuehFLTZx9mRhcCMx0c7k1f__6FvQAA/embed"></iframe>
<!--kg-card-end: html-->
<h2 id="how-tinybird-makes-this-possible">How Tinybird makes this possible</h2><p>Tinybird's architecture has been crucial in enabling this dual-purpose analytics system:</p><ol><li><strong>Speed</strong>: Queries return results in milliseconds, making real-time dashboards possible</li><li><strong>Scalability</strong>: Handles both individual user queries and system-wide analytics efficiently</li><li><strong>Flexibility</strong>: Same data source serves both internal and user-facing needs</li><li><strong>Real-Time Processing</strong>: Updates reflect immediately in both internal and user dashboards</li></ol><h2 id="technical-implementation">Technical implementation</h2><p>Our setup process is straightforward using Tinybird's local Docker container:</p>
<!--kg-card-begin: html-->
<iframe width="100%" src="https://snippets.tinybird.co/XQAAAAIJAQAAAAAAAABBKUqGk9nLKu-Z7dkNpj44RcikGVtTV8fWZuBEyA6lHdS-85EfR5yZMmfvwUf1L5P25YQeyc5LwlZoSfAQAZLi6i2cazBu79YG1gixU83Z2i9fBXsad0RG2-EgGo3KQc1srKykwiQfuMHuikMAOQeSyCszrehappRaMfRwgcnku4mY6rdT6wSCIX0lKZ1M9XA1ZtWP5N6vLAhyCItPFZrvisw5xXLRPa83d4NW-siUJUNv8C_dqqfhnLb_1cmAAA/embed"></iframe>
<!--kg-card-end: html-->
<h2 id="benefits-of-using-tinybird-for-our-analytics">Benefits of using Tinybird for our analytics</h2><ol><li><strong>User Transparency</strong>: Users have clear visibility into how they're using the platform</li><li><strong>Resource Optimization</strong>: Real-time usage tracking helps users manage API costs</li><li><strong>Unified Analytics</strong>: One system serves both internal and external needs</li><li><strong>Performance</strong>: Fast query responses enable a smooth user experience</li><li><strong>Scalability</strong>: Handles a growing user base without performance degradation</li></ol><h2 id="conclusion">Conclusion</h2><p>Tinybird has been instrumental in building Inbox Zero's analytics infrastructure. It not only helps us understand how users interact with our platform but also enables us to provide valuable insights directly to our users. The ability to serve both internal and user-facing analytics from the same infrastructure, with exceptional performance, has made Tinybird an invaluable part of our open-source email management platform.</p><p>And with Tinybird's recent announcement that you can <a href="https://www.tinybird.co/blog-posts/tb-infra"><u>run the Tinybird Docker container on your own infrastructure for free</u></a>, it's a perfect matchup for open source Inbox Zero deployments.</p><p>Also, if you're building AI features or apps like Inbox Zero, I'd encourage you to check out the <a href="https://www.tinybird.co/templates/ai-analytics-template"><u>LLM Performance Tracker template</u></a> that Tinybird just released - it's a great starting point for building multi-tenant AI agent analytics features.</p><p>Visit <a href="https://getinboxzero.com"><u>Inbox Zero</u></a> to try out our AI email assistant and see these analytics in action, or check out our <a href="https://getinboxzero.com/github"><u>GitHub repository</u></a> to explore how we've implemented this system.</p>
