Hi everyone,
I’m trying to process JSON data received from an API call (Efento API) using the Server Script action from the Toolbox plugin in Bubble.
What I want to achieve - Convert the API response in this format:
into a simpler format by extracting specific fields and adding additional parameters (Workcenter
and Company
).
- The data structure should be flattened to this structure:
and sent to Bubble’s database via a bulk create API call.
My Setup:
- Step 1: API Call (Efento API) → returns JSON data with a list of measurements.
- Step 2: Server Script (Toolbox Plugin)
- Inputs:
Thing 1:
Workcenter (text)Thing 2:
Company (text)Thing List 1:
API call result (Efento API’s measurements)
- Outputs:
outputlist1:
Flattened JSON list (to be sent to Bubble API)outputlist2:
Debug JSON for verification
- Step 3: Bubble API Call (Bulk Create Measurements)
The issue:
- The script runs, but instead of processing the data, Bubble only saves the initial test data from the API setup.
- I don’t see the expected structured output being passed to the next step.
- No errors appear in the workflow logs, making it difficult to debug.
I’ve tried many different directions but it looks like the script is returning empty value.
Could anyone suggest what I’m doing wrong? Any advice would be greatly appreciated.
Thanks in advance!