# Get rows of data into glide via call api

**URL:** https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309
**Category:** Ask for Help
**Tags:** api
**Created:** [December 3, 2024, 7:33am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309 "2024-12-03T07:33:47Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 7:33am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/1 "2024-12-03T07:33:47Z")

</div>

I followed the instructions on this page:

> **[Call API | Glide Docs](https://www.glideapps.com/docs/automation/integrations/call-api)**
>
> Send and receive data from API endpoints.

I did this

 ![Screenshot 2024-12-03 at 18.32.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/7/773b8d713c3b65f86779a1c2789402fe65b721db.png)

I don’t get one record per row  
I get this

 ![Screenshot 2024-12-03 at 18.32.48](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/1/81df1a3d4b0d5e616ff5a6c3d6eb3846d836d2b7.png)

How do I get one record per row?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 3, 2024, 7:38am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/2 "2024-12-03T07:38:47Z")

</div>

It looks like your Call API returns a JSON collection. What you need to do is number the rows in your table, starting at zero, then use that with a JSON Query column to extract each item in the collection, one per row.

If you can post a sample of the JSON (please enclose in triple backticks so it’s formatted correctly), then I can probably help a bit further.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 8:00am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/3 "2024-12-03T08:00:10Z")

</div>

My man 🙌

```auto
{
    "success": true,
    "data": [
        {
            "id": "c0b059d0-b144-11ef-ac0b-c76b0d4251c7",
            "title": "Fruit Co lead",
            "owner_id": 22602236,
            "creator_id": 22602236,
            "label_ids": [],
            "value": null,
            "expected_close_date": null,
            "person_id": 9,
            "organization_id": 6,
            "is_archived": false,
            "source_name": "Manually created",
            "origin": "ManuallyCreated",
            "origin_id": null,
            "channel": null,
            "channel_id": null,
            "was_seen": true,
            "next_activity_id": null,
            "add_time": "2024-12-03T07:03:52.045Z",
            "update_time": "2024-12-03T07:03:52.045Z",
            "visible_to": "3",
            "cc_email": "pure-legal+13684333+leadbeob78epxakvayf8d0hjcal6v@pipedrivemail.com"
        },
        {
            "id": "f2922050-b144-11ef-ac0b-c76b0d4251c7",
            "title": "Animals Co lead",
            "owner_id": 22602236,
            "creator_id": 22602236,
            "label_ids": [],
            "value": null,
            "expected_close_date": null,
            "person_id": 10,
            "organization_id": 7,
            "is_archived": false,
            "source_name": "Manually created",
            "origin": "ManuallyCreated",
            "origin_id": null,
            "channel": null,
            "channel_id": null,
            "was_seen": true,
            "next_activity_id": null,
            "add_time": "2024-12-03T07:05:15.733Z",
            "update_time": "2024-12-03T07:05:15.733Z",
            "visible_to": "3",
            "cc_email": "pure-legal+13684333+leadeczkhsevf6as2z9cn5voyeklj@pipedrivemail.com"
        }
    ],
    "additional_data": {
        "pagination": {
            "start": 0,
            "limit": 100,
            "more_items_in_collection": false
        }
    }
}
```

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 8:01am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/4 "2024-12-03T08:01:42Z")

</div>

[API docs](https://developers.pipedrive.com/docs/api/v1/Leads#getLeads)

Yes it returns a collection with metadata

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 3, 2024, 8:52am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/5 "2024-12-03T08:52:03Z")

</div>

Which specific bits of information are you interested in?

Actually, let’s just say you want the title of each one. I’d probably use a JavaScript column, like this:

 ![CleanShot 2024-12-03 at 16.50.55@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/84252ee563b78662321bab9377b4b66ab845be7c.png)

```auto
const json = JSON.parse(p1);
return json.data[p2].title;

```

If you need some other attributes, do the same thing and modify the second line.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 8:53am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/6 "2024-12-03T08:53:39Z")

</div>

Thanks. I can’t use any of the json integrations to query data out of a record?

Also, use case is: label a lead in pipedrive crm, then only those records appear in glide.  
If I am getting diff data each time I call api, then I assume the static row numbers in glide table won’t matter right?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 3, 2024, 9:08am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/7 "2024-12-03T09:08:51Z")

</div>

> [@blairrorani](#):
>
> Thanks. I can’t use any of the json integrations to query data out of a record?

You could use the Query JSON column, but that would require an extra template column to combine the row index with the attribute. So I find it easier to use a JavaScript column.

> [@blairrorani](#):
>
> Also, use case is: label a lead in pipedrive crm, then only those records appear in glide.  
> If I am getting diff data each time I call api, then I assume the static row numbers in glide table won’t matter right?

No, that shouldn’t matter. Important thing is you have enough numbered rows in your table to cover the maximum number of expected results.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 9:15am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/8 "2024-12-03T09:15:09Z")

</div>

Do you think glide will create a native solution for this? Must be reasonable common.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 9:24am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/9 "2024-12-03T09:24:01Z")

</div>

> [@Darren\_Murphy](#):
>
> ```auto
> const json = JSON.parse(p1);
> return json.data[p2].title;
> 
> ```

Wait do I need that template column for my JSON? Or can I use the call API column?

Oh is that to strip out the meta data?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 3, 2024, 9:29am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/10 "2024-12-03T09:29:18Z")

</div>

Yes, just use the output of your Call API column as the `p1` parameter in the JavaScript column.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 10:44am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/11 "2024-12-03T10:44:03Z")

</div>

![Screenshot 2024-12-03 at 21.41.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/9/f9fb19df9b1abab1293570dd9bd55cd8c8fd21c9.png)

Error?

I only retrieved one record via my api call (intentionally), does that matter?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 3, 2024, 10:49am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/12 "2024-12-03T10:49:50Z")

</div>

Generally you can ignore that error. You’ll get it if the `p1` value is empty on any row, or if you have more rows than items in the JSON collection.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 12:30pm UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/13 "2024-12-03T12:30:51Z")

</div>

got it thx mate, I’ve added logic to my JS to check values exist to avoid this.

Basically building [this](https://www.glideapps.com/customers/mintleads) for a client.

- Summarise lead based on CRM data
- Add notes in Glide and sync to CRM
- Draft follow up email based on notes

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [December 3, 2024, 1:07pm UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/14 "2024-12-03T13:07:36Z")

</div>

FYI, you are sharing your API token with the world. Might want to change that.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 3, 2024, 1:12pm UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/15 "2024-12-03T13:12:59Z")

</div>

thanks, nah that is just a small part of the key

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 8, 2024, 11:03pm UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/16 "2024-12-08T23:03:16Z")

</div>

![Screenshot 2024-12-09 at 10.01.06](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/5/85f9c05393b220836fbb0efd86d8593da436f377.png)

- Text field
- Button with action (Call API)
- Body of API request
- API response

Table:

 ![Screenshot 2024-12-09 at 09.59.44](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/2/72bc6dac90a8ca32c4c9f71e236da4cd19f3a00e.png)

How do I get these results (there are x 10) into their own rows in Glide?  
I know I can query out an individual record by adding an index column with numbers from 0…9, however, based on my table (above) I’m not sure how I create all the rows I need after I get the API response?

---

<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: [December 9, 2024, 12:41am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/17 "2024-12-09T00:41:17Z")

</div>

So those rows need to be static, not just “temporary” for viewing purposes right?

Do you have access to Call API?

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 9, 2024, 1:03am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/18 "2024-12-09T01:03:39Z")

</div>

They will actually be temporary. I’m still working on the flow TBH.

The idea is you can search for companies that are similar to another company and get a results (above).

The I want each result to be a row/record in a table.

I think I might have a **search** be a record and then results will be related records (one search has many results) and each new search has new results. Current thinking.

Eventually I want to be able to click a result in the UI and view its details and edit and then send to CRM to create a lead (not really important, just context).

Yes I have call api

---

<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: [December 9, 2024, 1:11am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/19 "2024-12-09T01:11:55Z")

</div>

> [@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)

Please adapt this method with a helper table.

---

<div class="post-metadata">

### Author: ![blairrorani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/blairrorani/32/43426_2.png) [@blairrorani](https://community.glideapps.com/u/blairrorani)
#### Post date: [December 9, 2024, 1:21am UTC](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309/20 "2024-12-09T01:21:45Z")

</div>

thanks, can you explain helper table?

I think I’m going to create an action that populates a table using the request ID as an identifier, so each set of results is can be listed in the UI.

I get the transpose method, that is a mission to set up though 🙂

[Next page](https://community.glideapps.com/t/get-rows-of-data-into-glide-via-call-api/78309.md?page=2)
