How to view an attachment (Excel , word) of a chosen record from airtable

From Airtable I want to view from the first record a Screenshot 2021-02-01 194310 excel doc from the column “Attachments”
From in airtable call GetCell with the rowNum 1 and columnName “Attachments” I get a value when i display it it’s a object I can not pass it into a image the Get propriety of object with the propriety name “attachments” does not show anything

I can get the JSON format of the Object value.

{“id”:“attG8nPXiowxB70VW”,“url”:“",“filename”:"The 10 Factors of live.xlsx”,“size”:18689,“type”:“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”,“thumbnails”:{“small”:{“url”:“”,“width”:32,“height”:32},“large”:{“url”:“”,“width”:320,“height”:226}}}]

If I use one of the URL I can see the excel file passing this URL to a image.

The problem that I get is how to select this url from the JSON file to pass it automatically to Thunkable ?

1 Like

The correct JSON structure is thumbnails/large/url you missed one level.

muneer thx for your replay
I have try it but still does not work

I receive nothing in the ImageEventAttachmentAirT_Scr6
I receive nothing in the Text_Input_Result_Scr6 .

It’s strange because when I copy the url and past it manually as text into the ImageEventAttachmentAirT_Scr6 then I receive the excel image into my screen
I copy into a text format this :

1 Like

I can spot in the screenshot that the JSON string starts with [ which means you need to include it in a Thunkable list to be able to read it correctly. This was not in the sample text you copied in your earlier post.

I had notice it when I had use the JSON Formatter & Validator to order my JSON file.
I have already put the string to a list

I display it in the Text_Input_Result_Scr6 and I still have The !!!

[{“id”:“attG8nPXiowxB70VW”,“url”:“",“filename”:"The 10 Factors of live.xlsx”,“size”:18689,“type”:“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”,“thumbnails”:{“small”:{“url”:“",“width”:32,“height”:32},“large”:{“url”:“”,“width”:320,"height”:226}}}]
strong text

1 Like

The way you use the list is not the correct way. Because I do not have access to your files, I created a simple example here

I made a JSON list in the variable which is in the place of what you will receive from your Airtable GetCell and then worked on it to show how you read JSON data inside a list.

I copied the JSON string from your post and inserted it in my project to show you a more meaningful example.

Please copy this project

Thx Muneer it help .

Muneer hello directly to you because i know that you have the expertise.
I want to use a link from a link field from my Airtable database:

I receive a JSON answer after a AirTable get row (rouw number 1 in my test) .it’s the first part of the following sentence:

{“Editor”:“Alain”,“Attachments”:[{“id”:“attG8nPXiowxB70VW”,“url”:“",“filename”:"The 10 Factors of live.xlsx”,“size”:18689,“type”:“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”,“thumbnails”:{“small”:{“url”:“",“width”:32,“height”:32},“large”:{“url”:“”,“width”:320,“height”:226}}}],“Notes”:"Info modifie”,“Name”:“Modified”,“URL”:“Https://”,“Photo”:“",“ID”:1,“Date”:“2021-01-02”,"_id":"recS8STL42p9rIJ80”}

“filename”:“The 10 Factors of live.xlsx”,
“Notes”:“Info modifie”,

Here is the bloc of my test:

I don’t receive in the label the name of the editoor , and I don’t receive in the button test the text from my URL in this case " Https://" !!!
what I want to do is receive the URL in the text Button and when I will push to the button I will open a link with this URL . But first I have to receive this URL information .
It’s to notice that the answer from JSON have no " "

1 Like

The JSON answer have no “[” and no “]”

1 Like

Please note that both Editor and URL are outside of the list and therefore you can call them this way

The answer is this


Hope this is clear

Thanks very much muneer; it works

1 Like