(a bit solved) Airtable or API error

Hello!:wave: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:

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

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


This is a screenshot of my airtable database.

And here’s a sample image of how it looks like entering the foodish api (https://foodish-api.herokuapp.com/images/pizza/pizza26.jpg).

And finally, the image for my app.

Well something is wrong with either the api or database.
Can you help❓

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

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

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

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”? 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.

The first step given doesnt work
2nd step:

Like this?


(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.

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.

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. 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.

1 Like

I also realized that the error meant it cannot access the Airtable database. :no_entry_sign: 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). It could be down :arrow_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.

The server IS down. :sweat_smile:

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.

Here is an example of the blocks I suggested:

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.

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.

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

1 Like

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


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.

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

1 Like

Sounds good! :+1: