[Native mobile plugin] Toolbox - Custom JS runner that returns real typed values

Hi there,

We’re back with Toolbox - Custom JS runner, a mobile native alternative to web Toolbox:

Execute your own JavaScript in a native mobile app and get real Bubble values back: numbers, dates, lists and objects, not just strings.

:tada: Async/await support (with a configurable timeout)
:partying_face: Automatic type conversion (parameters & returned values)
:sparkles: Runs your code in the app’s own JavaScript engine (no WebView layer to load, so it’s super fast)
:flexed_biceps: Rock-solid error handling (your code should never crash your app).

Test in demo app
See in Bubble Editor
User documentation
Install plugin

How does it work?

Depending on your code, the plugin will return:

The code returns You read it in As
a text result_text a text
a number result_number a real number
a date result_date a real Bubble date
a list of numbers result_list_numbers a list you can bind to a Repeating Group
a list of texts result_list_texts a Bubble list
an object result_json clean JSON
a yes/no result_yes_no a real boolean

How is this plugin different from the web Toolbox?

On the web plugin This plugin
you had a Run javascript action + a separate JavascriptToBubble element one element, action and typed states together
bubble_fn_suffix(value) to publish a result return value
one JavascriptToBubble element per output value one element, every typed result already exposed
declare the output type by hand detected for you (returned states include result_type)
numbers and dates passed as text, re-parsed in code typed in, typed out
properties.paramlist.get(...) to read a list list parameters are real arrays
fire-and-forget calls for async real await, with a timeout

Why did we choose not to make the JS code field dynamic?

Inserting a dynamic value into a text field would turn it into a string (your numbers and dates lose their type). Plus, a value that contains a quote or comes from an end user gets concatenated into the code itself, which can break the script or open the door to injection.

With our typed parameters (text1…4, number1…4, date1…2, list_texts1…2, list_numbers1…2, date1…2, yesno1…2), a value is always data, never code. You simply place your dynamic expressions in those fields, then use them in the code by typing ‘text1’, ‘text2’, ‘number1’, ‘date1’, ‘list_texts1’, etc., in the JS code field.

If you need more parameters (for example, a fifth text or a third number), you can put a JSON string in a text parameter and parse it in your code.

The plugin only works in native apps

It won’t run in web apps or WebView-wrapped apps, since BDK, Natively, and similar wrappers don’t use the React Native runtime it relies on.

AI-assisted setup

We built the user documentation we wish every Bubble plugin had.

But the plugin also ships with a context document designed to be pasted into any LLM. Once pasted, your AI assistant knows every field, every state, every event, and the most common configuration patterns of the plugin. It can write your Bubble dynamic expressions, answer your questions and suggest the right configuration for your specific use case, without you having to dig through documentation yourself. The download link is in the user documentation.

Feedback welcome

If you notice a bug, a weird interaction with another plugin, or there is a specific business case you would like the plugin to cover, please reach out. We happily take any question or improvement request. Plus, we react quickly!

More from BetterNotCode

A few other plugins we have built:

  • Advanced Push Notifications: rich push via Google FCM (free and unlimited), with images, topics, multicast, web push, and click tracking.
  • Auto Skeleton Loader: shimmer placeholders that read your Bubble layout automatically and follow it when it changes.
  • Mobile File Downloader: save any file from your Bubble native mobile app to the user’s device (gallery, iOS share sheet or Android Downloads folder).
  • Observable Plot x D3 Charts & Maps: 33+ powerful, magical chart types from the D3.js creators, with built-in transforms (no need to prepare your data), auto charts, maps, and export.
  • Toggle Studio & Hold : highly customizable toggle styles for web and native apps, with juicy animations and satisfying user feedback.
  • Data Toolbox (native mobile) : JSON, CSV & XML conversions, regex with capture groups, deduplicate, group by, multi-key sort, compare lists, SHA-256, UUID, Base64 encode/decode, fuzzy search, stats, slugify. 39 data tools Bubble Mobile lacks, all on the device (and all for 0 WU).
2 Likes