I’d like to leverage Blockspring to run a calculation that takes data from Bubble, does math, and returns a table back to Bubble. I’ve got the sending data to Blockspring part working, however, I’m unclear how to format the response so that I can input it in Bubble.
If JSON is the correct format for a response, any thoughts on how I input this data into my database? I need it to generate 3 rows (1 per key:value pair), as opposed to putting the list into a single cell.
…
One idea I had was to use the webhook feature in Blockspring and POST the data to blockspring because I know how to receive a JSON response from a POST.
I was able to get the POST working in Postman, but entering the same params in Bubble throws a formatting error. Here’s that example:
Post data from Postman to Blockspring generates the response I’d expect.
Why might this work in Postman but not in the Bubble Connector? Is there a way to see what Bubble is sending to Blockspring when I initialize the POST call from Bubble Connector? This is not appearing in the logs.
I’ve continued to work on this issue and believe that the data sent to Blockspring needs to be parsed somehow. It’s not clear to me what exactly Blockspring receives which would be helpful in troubleshooting the input. Your input here would be of great help.
Also for context, I’m sending this as a POST from the Bubble Connector because via a POST response (from a Scheduled API workflow on a list) is the only way I’m aware (thanks to Nigel and Levon) to populate the Bubble database with a multi-row response.
(Above) I tried to simply hit Blockspring directly from a workflow worked. The formatting of the input/ “do search” was recognized by Blockspring. But, I couldn’t figure out how to parse the results which were lists. The full list winds up in a single cell which is not what I need, so I’m not working with Bubble Connector and using a webhook approach now.
I’ve created a test-app to show the issue I’m having POSTing from BubbleConnector to Blockspring. I’ve got the block working in blockspring, but when I POST the same data from Bubble to Blockspring, I get an error.
The same POST in postman works (below). Bubble, however, throws an error. Any idea how I need to format the POST from Bubble so that Blockspring can receive the data?
We’ve previously said BubbleConnector doesn’t yet handle nested JSON arrays. If this is still the case, how are folks getting data back from Blockspring?
I’m looking to use the BubbleConnector via “Schedule a workflow on a list” to pull coln1 and coln2 key:value pairs from Blockspring as rows in my database in Bubble.
If it’s about nested arrays, this one should be fine, because df is at the top level and is an array (the issue is if the array is one of the fields). But I’m a bit confused, is it a Workflow API question, or a Blockspring question?
My goal is to: send data (multiple key:value pairs) to Blockspring; have Blockspring run an R program; and return a JSON table back to Bubble.
The questions are: What format do I need to POST data to blockspring and how do I need to format the Blockspring response so that Bubble can accept it.
Summarizing above, I’ve taken the following approaches:
Blockspring plug-in. While I was able to send data (multiple key:value pairs) to Blockspring; I don’t know a way to parse the response (which is a table) and insert that table into separate rows in Bubble.
Thanks to Nigel and Levon, I do know that I can use BubbleConnector and Schedule an API workflow on a list to return a table and insert it into my Bubble database row by row.
So, in approach 2 (which at present I think is the only viable approach), I’m trying to POST data to Blockspring using the BlockspringConnector. However, Blockspring doesn’t like the format of the inputs and the Blockspring response looks to be a nested JSON array (eg. df).
Here’s a screenshot of the POST to blockspring. Blockspring doesn’t recognize the inputs. But this works in POSTman so it appears to be a Bubble thing.
You would do this by defining the value in the list of parameters (if you make them client-safe), you can use dynamic data. The “df” you’re talking about is the response, not the data the send, so i don’t think it’s relevant.