Creating a Text file or URL in backend

I am receiving some text in json from API 1 which I am sending to API 2 which only accepts file uploads (URLs). I am wondering how I can generate a text file which contains the text from API 1. I am thinking I could somehow use the data API and create an endpoint URL with the text but I have not tried that yet.

Thank you

2 Likes

Hi Javier! I’m experiencing the exact same situation, where you able to solve it?
Thanks in advance!!!

Hello, I wrote a js code for a similar question yesterday. What kind of txt file do you need?

Hi @tunacardak , thnaks for your help!
I’m not sure if I have any restrictions regarding the type of txt file I need. I want to send it to the openai assistants and the documentation says they accedpt txt format. Not sure if this answers your question or if I missunderstood it.

1 Like

Yes, we can create a .txt file, but I believe there are other ways to send data to OpenAI. Can you show the URL of the documentation that says they accept only .txt files, please?

1 Like

Hey there, I made an endpoint that takes the file’s name and content and returns a URL where the file has been uploaded. You can use that URL and save it in your Bubble storage after using :save to Bubble Storage


image

Endpoint:
https://sykbil.buildship.run/text-file

I made this workflow using Buildship

I’m planning to make a course for teaching Bubble devs how to use Buildship to expand the capabilities of Bubble, you can read more here if you are interested :slight_smile: