I’m newbie using bubble. I’m making an app that saves data as a JSON and I want to save that json as a plain text in a field of my database, I have already Setup my RunScript and my JavascripttoBubble elements
The code is this
let dataParsed = JSON.stringify(documentData);
console.log(dataParsed)
bubble_fn_documentData(dataParsed);
// Convertir el objeto a formato JSON y enviarlo a make
let call = async function() {
await fetch("URL", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(documentData)
});
};
// Ejecutar la función
call()
.then(() => console.log("Petición enviada exitosamente"))
.catch(error => console.error("Error al enviar la petición:", error));
@gameclips.md changr your workflow series for saving the output. Instead of it being a step in the series that also includes the run JavaScript, have the action to save the data be from a trigger of Bubble JS event is triggered.
This. OP, other actions in the workflow will not wait for the final result of your Run Javascript action’s code. The J2B element will always have a value, in this case a null or blank value, in regards to how it interacts with other actions. A plugin’s result is a state after all.