# (a bit solved) Airtable and API error

**URL:** <https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158>\
**Category:** Web API's\
**Tags:** database, solved, help, webapi, airtable\
**Created:** [January 13, 2023, 5:09pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158 "2023-01-13T17:09:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [January 13, 2023, 5:09pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/1 "2023-01-13T17:09:44Z")

</div>

Hello!👋I was making an airtable app. It was about feedback, but my main problem is the image. I confirm I have all credentials right. This is what it returns when giving the image:

```auto
Airtable error: Could not find table Foodish.csv in application (censored)

```

IMAGES🖼:  
Here is some of my code to get the api’s image.

 ![airtable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f7e97725936eab90f88dd286e69b69a1c83abd0.png)  
This is a screenshot of my airtable database.  
 ![airtable2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cdb0b93fe2515eef38c77873de867eca687e2ad6.png)  
And here’s a sample image of how it looks like entering the foodish api ([https://foodish-api.herokuapp.com/images/pizza/pizza26.jpg](https://foodish-api.herokuapp.com/images/pizza/pizza26.jpg)).  
 ![api](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/6/b6ccf7b6316d4931c2c9d782b0b254943325ff49.png)  
And finally, the image for my app.  
 ![d](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/277d44ac0b403c5ea713d04881804defbdd0bef3.png)  
Well something is wrong with either the api or database.  
Can you help❓

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [January 13, 2023, 5:23pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/2 "2023-01-13T17:23:52Z")

</div>

To the one guy replying: please note that the appb\*\*\*\*\*… has been replaced with (censored). Do not mention the BaseID.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 13, 2023, 5:30pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/3 "2023-01-13T17:30:38Z")

</div>

The first issue is that the url you posted doesn’t work:

[https://foodish-api.herokuapp.com/images/pizza/pizza26.jpg](https://foodish-api.herokuapp.com/images/pizza/pizza26.jpg)

So even if everything goes right with your blocks, you’ll still get an error.

You’re calling it the “foodish api” which at first confused me. The API you are accessing is the Airtable API. I understand that your table is named Foodish.csv but that doesn’t make it an API. It’s simply data accessed _from_ the Airtable API.

When you have a problem with your blocks, you need to **simplify** and test. There are so many possible reasons this might be working that the first step should be:

1. Can you get **any** data from Airtable? For example, what happens if you set a label’s text to `get property "DishName" of object in list [rows] get #2`? Does that work? What value do you see in the label?

2. If you cannot get any data from Airtable, the next step is to check the error it returns. It sounds like you did that and saw “Could not find table Foodish.csv in application”. So even though you say your Airtable credentials are correct, I don’t think they are. Double-check them again. Also try to connect to a different Airtable table and see if that works. More importantly, why are you using a Web API block to connect to Airtable? You can just use the Data Source blocks (Get Value, Get Row Object, List of Values) and it’s much easier. For example, to get a random DishName, you would just replace the entire `get property of object` block with this block:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/e/6eefb36ccaa14e9a676dc926dc395dfa6f9ab490.png)

And actually, **all of the blocks** in your screenshot could be replaced with just `set ImageDisplay's Picture to [random item of list [list of values in (Data Source)]]`.

1. For now, remove the API from the equation. What happens if you make it so that when the screen opens, you set ImageDisplay’s Picture to “[https://foodish-api.herokuapp.com/images/pizza/pizza26.jpg](https://foodish-api.herokuapp.com/images/pizza/pizza26.jpg)”? What appears? Because like I said, even if everything goes right with your blocks and you get the value “pizza/pizza26.jpg” from the Airtable API, you’re still going to see an error.

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [January 13, 2023, 5:35pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/4 "2023-01-13T17:35:38Z")

</div>

The first step given doesnt work  
2nd step:

> [@tatiang](#):
>
> 1. For example, to get a random DishName, you would just replace the entire `get property of object` block with this block:
> 
> ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/e/6eefb36ccaa14e9a676dc926dc395dfa6f9ab490.png)

Like this?

 ![ra](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/3/5342c9a78f48e1e4de27bd14443e063a4b7f09a1.png)  
(not tested)

Also, the third step doesn’t work too. The heroku api refuses to give an image. Same message. But that wasn’t with screen opens. If I use screen opens, Thunkable crashes the app.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 13, 2023, 8:09pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/5 "2023-01-13T20:09:28Z")

</div>

So you’ve told me that you can’t get **any** data from Airtable using the API. **So you either need to fix the authentication, try another table from Airtable, or just scrap the API like I suggested and use Data Source blocks.**

No, the blocks are incorrect. What I meant was to join the url with `random item of list [list of values (Data Source name)]`. You can see an example of the List of Values block in this section of the documentation: [Data Sources - Thunkable Docs](https://docs.thunkable.com/data-sources#read).

As I said, if the 3rd step doesn’t work then you have a problem with that website. I now see that you **are** using the Foodish API as well as the Airtable API. ~~Can you post an example of a working image url from the Foodish API? Even a sample one from their documentation would be fine.~~

**Edit:** the Foodish API site is **down**. I can’t even get to their base url: [https://foodish-api.herokuapp.com](https://foodish-api.herokuapp.com). You’ll need to use something else or contact them to find out why it isn’t working. This has nothing to do with Thunkable.

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [January 13, 2023, 11:38pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/6 "2023-01-13T23:38:05Z")

</div>

I also realized that the error meant **it cannot access the Airtable database. 🚫** But yes, you could be right with the Foodish API, I have seen other people have problems (like [Server down? · Issue #16 · surhud004/Foodish · GitHub](https://github.com/surhud004/Foodish/issues/16)). It _could_ be down ⬇.  
But adding a data source instead of airtable component makes it unable to select my database name “Foodish.csv”. And can you please show me how the `random item of list [list of values (Data Source name)]` looks like in blocks?

**Edit:** not to mention that I didn’t create the API, so I will have to notify the team or check with the one of the people who manages the api.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 14, 2023, 1:24am UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/7 "2023-01-14T01:24:31Z")

</div>

The server IS down. 😅

Are you needing to get data from more than one table in Airtable? Because the Data Source blocks work great if you only have one table that you’re using. The documentation shows how to add an Airtable database (table) to a project: [Data Sources - Thunkable Docs](https://docs.thunkable.com/data-sources#airtable).

Here is an example of the blocks I suggested:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/8/583d5cce971307fddae1017a6c184996e8bbd2be.png)

In that example, I’m getting the full column called “Photo” from the Airtable database called “Quotes & Photos”. I’m then taking that list of row values (from the column) and getting a random item from it. And finally, I’m setting the image’s picture to that random item value.

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [January 14, 2023, 5:20pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/8 "2023-01-14T17:20:30Z")

</div>

Hi,  
another error. So I think the heroku server _is_ down but not only that, my airtable cant be accessed, even with the data source blocks given.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 14, 2023, 6:18pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/10 "2023-01-14T18:18:25Z")

</div>

I’ve given you several suggestions but you’ve only responded to one or two ideas. So go back through my post and try ALL of them: [Airtable or API error - #5 by tatiang](https://community.thunkable.com/t/airtable-or-api-error/2221158/5)

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [January 14, 2023, 7:04pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/11 "2023-01-14T19:04:59Z")

</div>

I can’t use something else, or it defeats the purpose of the app.  
I also can post something from their documentation📄 (not pizza26).

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/c/1c64f61a19ab5a1adc414dd49174a3456878df94.png)  
The “different table from airtable” one gives the same error.  
I double checked it as I remember and it’s still right, nothing wrong.  
Everything else that I did was not listed, I listed them before.

Edit: As of 2024, I used the newer API which does work, but airtable doesn’t work.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 14, 2023, 7:36pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/12 "2023-01-14T19:36:20Z")

</div>

Okay, if you still can’t get data from Airtable, you’ll probably need to get help from Thunkable staff.

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [January 14, 2023, 9:21pm UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/13 "2023-01-14T21:21:28Z")

</div>

Sounds good! 👍  
edit: It’s more likely it’d work if I contacted the api owner. maybe airtable community can do.  
Another way is to put all images into the airtable. but that is known to not work because the API! Or, maybe what can partially solve it is to move it Airtable to Google Sheets.

---

<div class="post-metadata">

**Author:** ![afnanfozailcw81](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/afnanfozailcw81/32/147438_2.png) [@afnanfozailcw81](https://community.thunkable.com/u/afnanfozailcw81)\
**Post date:** [April 9, 2023, 2:07am UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/14 "2023-04-09T02:07:49Z")

</div>

Replying in case I have any update. Just keeping this open.  
edit: I enjoy reading this topic all the time!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 8, 2023, 2:08am UTC](https://community.thunkable.com/t/a-bit-solved-airtable-and-api-error/2221158/15 "2023-07-08T02:08:29Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
