# Insert text into database

**URL:** <https://forum.bubble.io/t/insert-text-into-database/347579>\
**Category:** Database\
**Created:** [November 8, 2024, 7:41pm UTC](https://forum.bubble.io/t/insert-text-into-database/347579 "2024-11-08T19:41:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon61471621](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@anon61471621](https://forum.bubble.io/u/anon61471621)\
**Post date:** [November 8, 2024, 7:41pm UTC](https://forum.bubble.io/t/insert-text-into-database/347579/1 "2024-11-08T19:41:52Z")

</div>

Hi there,

I‘m dealing with chatGPT and storing text retrieved from chatGPT into a table.  
The output of chatGPT is in CSV-format, like

Field1\_1;field1\_2  
Field2\_1;field2\_2  
Field3\_1;field3\_2

In addition to that I have a table with two columns, field1 and field2, both type text. How do I get the data in the response during a workflow stored in the database?

Many thanks!!!

Markus

---

<div class="post-metadata">

**Author:** ![bubble.trouble](https://avatars.discourse-cdn.com/v4/letter/b/7ba0ec/32.png) [@bubble.trouble](https://forum.bubble.io/u/bubble.trouble)\
**Post date:** [November 8, 2024, 8:28pm UTC](https://forum.bubble.io/t/insert-text-into-database/347579/2 "2024-11-08T20:28:08Z")

</div>

“:split by…”?

 ![Screenshot 2024-11-08 at 3.27.13 PM](https://us1.discourse-cdn.com/bubble/original/3X/c/7/c71797e5435e6991d8fdd3f7bf085c9cbc6756d4.png)

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [November 8, 2024, 9:49pm UTC](https://forum.bubble.io/t/insert-text-into-database/347579/3 "2024-11-08T21:49:25Z")

</div>

Ask ChatGPT to give you the data in JSON format, build an endpoint that processes that JSON (make sure you set content-type structured JSON), call that endpoint internally and you can use those fields in further actions

 ![CleanShot 2024-11-08 at 16.47.36@2x](https://us1.discourse-cdn.com/bubble/original/3X/7/3/7310351b39c094342b8acdfa12a2d088d49a40fb.png)

[![](https://img.youtube.com/vi/NJs9Q4l1xMc/maxresdefault.jpg "How to integrate your Bubble app with OpenAI & ChatGPT to receive JSON Objects") ](https://www.youtube.com/watch?v=NJs9Q4l1xMc)

---

<div class="post-metadata">

**Author:** ![anon61471621](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@anon61471621](https://forum.bubble.io/u/anon61471621)\
**Post date:** [November 9, 2024, 4:41pm UTC](https://forum.bubble.io/t/insert-text-into-database/347579/4 "2024-11-09T16:41:44Z")

</div>

many thanks! by using the API-connector stuff I was now finally able to parse my JSON-string from chatGPT and store it in the database. However I do have an issue. When I initialize my API-connector and put the JSON-string into my body, it works fine.

 ![Bildschirmfoto 2024-11-09 um 17.40.15](https://us1.discourse-cdn.com/bubble/original/3X/7/6/7646f009cd91b6b12f7c7f7e9f5ec4c61bb8979a.png)

The same JSON-string handed over to through a workflow to the corresponding backend-workflow causes an error:  
Unexpected token \ in JSON at position 0

If I, for example, put the JSON-string into the textbox, copy&paste the text and re-initialize the API-call with this string, it works. Where is the difference??
