Creating JSON file

Hi, seeking help with creating JSON file within BE workflow. The goal is to get data from specific table in my DB and create a JSON file from it that I can then send in API request. API call is to OpenAI so I can store JSON file in Vector Stores.

Thank you for any help!

Filip

You just need to use a plugin to create the file. There’s a lot of options I think.


You may need to check if they offer server side actions.

Thanks, tried the JSON file generator but that is not for server side action. Will give it a go to the other one!

Hmm the other one also offers just an element for UI to create a file..

Yes it may not be easy to found one. I think the one I used in the past is now paid plugin and I’m not sure which one is it now.

Hey @filip.youneverwalkalo - do you know how to upload a file to your app using the API connector and base64?

If so, you can put this in a server side action (your JSON) and save it as a yourfile.json file in your app!

function stringToBase64(str) { return btoa(unescape(encodeURIComponent(str))); } let myString = {{your text input}}; let base64String = stringToBase64(myString); return base64String;

Good luck!

Note for anyone else out there, this can also create .txt files for LLMs

1 Like