[PLUGIN] - Bubble Data AI - (turns your database records into live AI context)

Hi all,

Another plugin has just landed, this one is called Bubble Data AI.

In a nutshell, it lets you point AI at the data already sitting in your database and get useful structured results back. Analysis, natural-language Q&A, and per-record content generation, all running against your existing tables without any restructuring or migration.

Demo and Instructions:
https://demo-plugins-13689.bubbleapps.io/version-test/bubble_data_ai

Plugin:
https://bubble.io/plugin/bubble-data-ai-1778471864013x520582452449116200

The idea behind it

Most “AI in your app” features mean wiring up the API connector, designing the prompts, parsing JSON responses, building the UI, handling errors etc. That’s a fair bit of work for what’s becoming a common need.

The plugin takes care of this, you configure which data types you want it to read, pick an AI provider, and then choose what kind of analysis you want. The results come back as fully typed states that drop into a repeating group or a text element directly, and the structure is already there.

Seven analyses to choose from

Each one is a preset you select on the ‘Run Preset’ action:

  • Dataset Insights gives you the headline view across a table, with metrics, trends, observations, and recommendations.

  • Record Classifier tags each record individually with a category, confidence score, and short summary.

  • Priority Ranker scores and orders records by urgency and importance, with reasoning attached to each ranking.

  • Anomaly Detector flags only the records that genuinely stand out, with severity and a suggested next step.

  • Data Validator surfaces quality issues like missing fields, suspicious values, or contradictions, with a suggested fix for each one.

  • Sentiment Analyzer reads the text in each record and labels it by sentiment and dominant emotion.

  • Theme Extractor pulls out the recurring topics across your records, with quoted examples and frequency counts.

Beyond the presets

There’s also an ‘Ask Question’ action where you type a question and the AI answers based on your records, returning the IDs of any records it specifically referenced.

And a ‘Generate Content’ action that creates AI content per record. Useful for batch jobs like writing product descriptions, summarising orders, or drafting follow-up emails. It can optionally write the generated content straight back to a field on each record, with rate-limit handling built in.

Choice of AI provider

The plugin works with either OpenAI or Gemini. OpenAI is the safer default for most uses. Gemini is worth considering when you’re working with larger datasets, since its context window is much bigger and the cost per token is lower. You’ll obviously need an API key from whichever you pick.

Other things worth mentioning

  • Multiple data types can be analysed together in a single run.

  • Relationship traversal up to three hops deep, so the AI can see a Category alongside its Products, or a User alongside their Orders.

  • Date range filtering on the ‘Run Preset’ action.

  • Responses in any language you specify.

  • Two layers of caching with a smart staleness check that avoids unnecessary fetches when your data hasn’t changed.

  • Proportional down sampling when datasets exceed your token budget, so the AI still sees a representative slice rather than a truncated one.

  • Token usage reported back after every action.

  • Debug mode that logs everything to the browser console while you’re getting set up.

A note on cost

Since the plugin runs client-side and reads through the Data API, every analysis run uses workload units on the fetch and AI tokens on the analysis.

Workload units depend on how many records you pull through and how often. The caching helps a lot here. Once your records are cached, repeat analyses of the same data doesn’t re-fetch, and the smart staleness check skips the fetch entirely when nothing has changed. Setting sensible limits on the ‘Max records per table’ option keeps things in check.

On the AI side, the default models (OpenAI’s gpt-4o-mini and Gemini’s gemini-2.5-flash-lite) are both cheap to run. You’re typically looking at fractions of a cent per run for a few hundred records. The token usage states (‘tokens used input’ and ‘tokens used output’) let you keep an eye on it, and the AI response cache means you only pay once for the same analysis until your data changes or the cache expires.

The more expensive scenario to be aware of, is that the ‘Generate Content’ action makes one AI call per record (so a hundred records is a hundred calls), and turning on ‘Follow relationships’ with a higher traversal depth multiplies the data sent to the AI. Both are entirely under your control through the action options, but worth knowing before you start pointing the plugin at larger tables.

I’ll be fully supporting the plugin, so if you run into any issues or have questions, give me a shout.

I hope it’s useful because I see the plugin as having a lot potential. If you’re familiar with Blueprint or Flusk and the kind of insight they give you about your app, Bubble Data AI does something similar but for the data sitting inside your database rather than the app structure around it.

Paul

Hi Paul,

Nice addition to your plugin collection. Quick question: could the plugin support individual report generation? The idea would be to feed in the constraints and relevant questions, and then let the plugin do the magic.

Best,

Hi @renwagner

Yes , it can definitely do that.

There’s an action in the plugin called Generate Content which generates AI content for one record at a time and can optionally write the result back to a field in your database automatically.

For example, imagine you had 100 records, each containing various fields of data along with a dedicated field called report.

You’d pass a list of unique IDs for those 100 records, specify the report field as the destination, and provide the instruction/prompt you want the AI to follow, so something like:

“Generate a report based on the data retrieved for this record.”

The plugin will then process each record individually:

  • Retrieve the relevant data for that specific record

  • Send it to AI

  • Generate the report/content based on the current record it’s dealing with

  • Write the response back into the report field automatically

In the above example, it would make 100 separate AI requests, which sounds like a lot, but in practice it’s usually very manageable. If you’re using OpenAI’s gpt-4o-mini model, it’s both fast and cost efficient. In most cases, the cost works out to only a fraction of a cent per report unless you’re generating extremely large outputs.

Each request is also paced with a minimum 100ms delay between writes, and the plugin includes automatic backoff/retry handling for rate limits, so it runs quite reliably even with larger batches.


There’s a demo of this functionality on the demo page. The dataset is probably different but it looks like this below, where the question is highlighted in yellow at the top, the “Records processed” count is a live running state, the Completed Results section is a state just so you can see what was updated, and then there’s a representation of the database at the bottom. The field that wrote to, was one called Notes.

Hope that helps
Paul

Great plugin!

Might be of use to me sooner than later :grinning_face: