Complex Pricing Formula (via Blockspring)

I’ve been searching through the forums, and I can’t say I’ve found exactly what I’m looking for. For my app, I need a rather intricate formula calculator that likely can’t be catered to by Bubble’s existing features. (which is fine) I took at look at Topic 557, but it doesn’t quite go through a tutorial on how to export data to a Google Sheet, have the Sheet do its thing, and then having the result thrown back into Bubble.

Hopefully you can walkthrough this process as it’s quite confusing. I believe Blockspring and yourself were working together at some point, maybe a joint-tutorial? A simple, broken down response would be greatly appreciated as well.

There is a Google Sheet function (fairly new) called Update Cell.

This runs as an action.

You then use Query Google Spreadsheet to get the result back.

However, I can’t see a way to input a value into Update Cell in Bubble action. Maybe one for @emmanuel ?

Assuming that is an oversight, we can set it up in a public app for you so you can see how it works. I haven’t yet worked out how I could do tutorial videos !

We’re in touch with blockspring there and waiting for some changes from them. Sending data to with the right format is a little tricky currently, they told us they might change that soon.

Alright. So there is no way to use Blockspring as I described at the moment?
What about any alternatives for running calculations?

You can run any calculation in a custom block. Currently, the limitation is for Google Sheet blocks.

You made mention of the ‘right format’. Could you elaborate?

That’s precisely what we’re talking about with their team. It’s a behind the scene question, how do we send data in a way they get. It’s not a concept that impact how you do things.

Okay. I trust that’s something you guys are taking care of. No worries.

If it’s not a burden, could you walk us Bubblers through how to send field inputs to a Google Sheet via Blockspring and retrieve the result of a calculation? A simple breakdown would be much appreciated. I think I’ve went through the Forum and Blockspring’s guide a few times now to no avail.

Again, that’s precisely what were taking about with Blockspring, so we can’t say much right now (reading google sheet is fine, not writing).

Having said that, many users that started using google sheet ended using Bubble’s built in database. Maybe that’s something you can consider.

I’ve spent a good amount of time trying to manipulate the database. (trust me, my app is doing this very well for other aspects) When it comes to the type of calculation I need, it’s not helping. I’ll see what I can do.

Hopefully you’ll let us know here when Blockspring works the return out with you.

Any news on this since January?
The Google Sheet Update Cell block is still a data and it should be an action.

Blockspring support didn’t respond to my email yet…
I really need to have access to a google sheet as the calculations I need to be done are very complex.

No news (I think I answered your email about this already.)

Best way to tackle this for now is to take advantage of Bubble’s API Connector and link up with MathJS.

1 Like

I ended up using zapier, it can only update entire rows but works well.
Thanks for the idea though!

Is there any news on this now? I’m trying to make a pricing formula of my own with multiple inputs and outputs linked to a google sheet.

Hi Tim! I’d like to suggest another route for you. You can use a plugin named Toolbox: Toolbox plugin - collection of utility elements , and just write your formula in it so it gets calculated in a much more stable and scalable way.

You would write something like (4*2)+15 and then have the result returned to you.

There’s also the Math.js plugin (local) but I can’t find the link. Just type in “Math” in the plugin search and you’re done.

Thanks Vini, I appreciate your idea. Its a little more complicated as about 10 cells are being updated by the inputs and I am still honing in on the right formula so I’d like the flexibility to change the cells. In google sheets. Any ideas on this method?

If you don’t mind telling us more, what are in those 10 cells? Text, number or a mix of those? And what logic are you trying to create, is it just a calculation? I’m asking because in most cases it is much easier to create the information logic and also do the calculations here in bubble. In the beginning, I too wanted to link with spreadsheets for that exact same reason, I was just too familiar with them.

Maybe if you acquaint yourself more with bubble you may find a way to easily accomplish what you need.

Thats a good call. Everything is numbers. The inputs are project type, size and quality, then those trigger estimated units and installation time, then those trigger installation cost which then triggers cost of goods sold. Concurrently the inputs also trigger billable hours estimates for three phases of work at different rates. Then cogs and billable hours are added together to get project cost and a mock timeline.

I’m quite sure one can do that in Bubble! It is just information being passed around and that’s something doable, with effort of course.

So I suggest that when you feel it is the right time, you can try to build that in bubble. Will be much better than an outside hack.