# Add Row from ChatGPT Table

**URL:** https://community.glideapps.com/t/add-row-from-chatgpt-table/61481
**Category:** Ask for Help
**Created:** [May 8, 2023, 12:42pm UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481 "2023-05-08T12:42:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [May 8, 2023, 12:42pm UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/1 "2023-05-08T12:42:25Z")

</div>

Looking to see if anybody has implemented the following:

Ask GPT a question and to display the answer in a table format.

Then Add rows to a Glide Table for each row in the ChatGPT Table.

For example, ChatGPT created the below table. I’d like to add a text entry component in my Glide App, where a user will enter a URL ([https://www.druthersbrewing.com/menu/](https://www.druthersbrewing.com/menu/)) and push a button. The Action will ask ChatGPT to organize the data in a table format and then add all the rows as separate rows to my Glide Table and inputting the correct info in the correct columns (Name, Description, Price).

Can this be done? In Glide only? Or do I need to leverage another program like Make?

Thanks!

 ![IMG_7500](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/2/e20eeca5a27b6bbb63255e7b64af814e5d9df0c8.jpeg)

Based on the Glide Bot it gives the following suggestion:

> You can use the Glide Tables API to add a row from a ChatGPT Table into your Glide Table. Here are the steps:
> 
> 1. Create a new trigger in ChatGPT that will be triggered when a new row is added to the ChatGPT Table.
> 
> 2. Use Webhooks by Zapier to create a Custom Request action, which is also known as a Custom API call. In the Custom Request action, copy the Add Row API usage for Glide Tables API.
> 
> 3. In the Add Row API usage, replace “TABLE-NAME” with the name of your Glide Table and “COLUMN-NAME” with the name of the column in your Glide Table where you want to add the data from ChatGPT Table. Replace “COLUMN-VALUE” with the corresponding value from the ChatGPT Table.
> 
> 4. Save the Custom Request action and test it to make sure it is working properly.

---

<div class="post-metadata">

### Author: ![Trustin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/trustin/32/88217_2.png) [@Trustin](https://community.glideapps.com/u/Trustin)
#### Post date: [May 8, 2023, 1:18pm UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/2 "2023-05-08T13:18:43Z")

</div>

One known way is to generate it as JSON, and replace the {" symbols with [HTML tables tags](https://www.w3schools.com/html/html_tables.asp)

,,

| 

I watched a video showing the exact steps but can’t recall the link, maybe someone else can provide it.  
A good video on JSON will be from [Create a Movies App (with Fetch JSON) | Glide Tutorial #nocode - YouTube](https://www.youtube.com/watch?v=fjgcxBvrWbEA)  
I can share my example for the prompt to get the JSON: `"Generate a JSON object, meets this criteria "[Z]."(Insert any other criteria) Use this schema: [{"title": "Day 1 - things to do", "itinerary": "details", "location": "latitude,longitude"}]`

 |
| --- |

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [May 8, 2023, 4:47pm UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/3 "2023-05-08T16:47:41Z")

</div>

Thanks I’ll check it out. Tried to play around with Zapier, but couldnt really figure out how to basically add each table row separately.

Also Id like to be able to create a checklist where the ones checked off are ultimately added to my Dish table. Guessing it would involve using a Helper Table to add all the dish rows. Then if a boolean column is true, add row to Dish Table.

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [May 8, 2023, 9:02pm UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/4 "2023-05-08T21:02:24Z")

</div>

Another suggestion via ChatGPT is:

To add each row from your table separately into your Glide app using the JSON API, you can send a POST request to the API endpoint for inserting a new row, with the data for each row in the request body.

Here’s an example JSON payload for inserting a new row with the Name, Description, and Price fields:

```json
{
  "rows": [
    {
      "Name": "Nachos",
      "Description": "House-made chips, queso, black beans, pico de gallo, jalapeño crema, guacamole",
      "Price": "$14.95"
    },
    {
      "Name": "Pretzel Bites",
      "Description": "Sea salt, whole grain mustard, beer cheese sauce",
      "Price": "$10.95"
    },
    {
      "Name": "Mac & Cheese Bites",
      "Description": "Crispy bites filled with creamy mac & cheese, chipotle ranch",
      "Price": "$10.95"
    }
    // Add more rows here
  ]
}

```

To send this payload to the API endpoint for inserting a new row, you can use a tool like `curl` or an HTTP client library in the programming language of your choice. Here’s an example using `curl`:

```bash
curl --request POST \
  --url 'https://api.glideapps.com/v1/spreadsheets/SPREADSHEET_ID/tables/TABLE_ID/rows' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "rows": [
      {
        "Name": "Nachos",
        "Description": "House-made chips, queso, black beans, pico de gallo, jalapeño crema, guacamole",
        "Price": "$14.95"
      },
      {
        "Name": "Pretzel Bites",
        "Description": "Sea salt, whole grain mustard, beer cheese sauce",
        "Price": "$10.95"
      },
      {
        "Name": "Mac & Cheese Bites",
        "Description": "Crispy bites filled with creamy mac & cheese, chipotle ranch",
        "Price": "$10.95"
      }
      // Add more rows here
    ]
  }'

```

Replace `SPREADSHEET_ID`, `TABLE_ID`, and `ACCESS_TOKEN` with your own values.

Note that in this example, the payload includes multiple rows in the `rows` array. You can add as many rows as you need by adding more objects to the array.

Not sure if this is accurate.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [May 9, 2023, 12:29am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/5 "2023-05-09T00:29:45Z")

</div>

Isn’t a problem of this being your model has to be able to browse? What do you do if it can’t browse?

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [May 9, 2023, 12:34am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/6 "2023-05-09T00:34:05Z")

</div>

What do you mean by browse?

One issue Im finding is that I cant seem to isolate a table row to add that specific row into my Glide Table.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [May 9, 2023, 12:36am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/7 "2023-05-09T00:36:37Z")

</div>

I mean you are telling the user to enter a URL and then expect the model to get the content of it? Would this URL change based on the user? I’m asking what would you do if it can’t browse and parse content from the URL.

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [May 9, 2023, 12:43am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/8 "2023-05-09T00:43:20Z")

</div>

Ah. Yes each restaurant owner would add their own URL to their online menu, which would be fed into the model to generate a table of all their menu items.

If there are no results then they would need to manually add each menu item via a form.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [May 9, 2023, 12:52am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/9 "2023-05-09T00:52:31Z")

</div>

What about passing it to Make and use a service to grab the screenshot of the website, OCR it, and use ChatGPT to return it in a JSON structure?

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [May 9, 2023, 12:58am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/10 "2023-05-09T00:58:30Z")

</div>

That could work, I just have zero knowledge with JSON lol. I know some also use PDFs for their menus, so guessing this type of solution could work for both?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [May 9, 2023, 1:16am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/11 "2023-05-09T01:16:38Z")

</div>

Yeah I think so, when you use a screenshot it can work with anything, but hopefully ChatGPT is consistent enough when working with the OCR result.

---

<div class="post-metadata">

### Author: ![Kathlyn](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kathlyn](https://community.glideapps.com/u/Kathlyn)
#### Post date: [March 19, 2024, 5:53am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/12 "2024-03-19T05:53:55Z")

</div>

Do you use any specific commands or prompts to tell ChatGPT to add a row to the table?

---

<div class="post-metadata">

### Author: ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)
#### Post date: [March 19, 2024, 10:40am UTC](https://community.glideapps.com/t/add-row-from-chatgpt-table/61481/13 "2024-03-19T10:40:49Z")

</div>

Never got this to really work but with Glides new AI and JSON columns, along with the Miracle Method, I think this is now possible.

> [@fishbaguette\_breadbasket Transpose Columns to an Inline List: The Miracle Method](https://community.glideapps.com/t/transpose-columns-to-an-inline-list-the-miracle-method/32766):
>
> I’m often asked how to take columns of data (say form responses) and display them in an inline list. Here’s one way to do it—the MIRACLE METHOD. [[Glide: Transpose Data Columns into an Inline List with the MIRACLE METHOD] ](https://www.youtube.com/watch?v=t-sh_Q3WbQc)
