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”:“https://dl.airtable.com/.attachments/1f3d5b146299eff18cc0d43c6827fdb9/e837f5a5/The10Factorsoflive.xlsx",“filename”:"The 10 Factors of live.xlsx”,“size”:18689,“type”:“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”,“thumbnails”:{“small”:{“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-c90d94a92aef5226-32x32.jpg”,“width”:32,“height”:32},“large”:{“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-49c4d34fb0db2969-320x226.jpg”,“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 : https://dl.airtable.com/attG8nPXiowxB70VW-c90d94a92aef5226-32x32.jpg

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.

muneer;
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”:“https://dl.airtable.com/.attachments/1f3d5b146299eff18cc0d43c6827fdb9/e837f5a5/The10Factorsoflive.xlsx",“filename”:"The 10 Factors of live.xlsx”,“size”:18689,“type”:“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”,“thumbnails”:{“small”:{“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-c90d94a92aef5226-32x32.jpg",“width”:32,“height”:32},“large”:{“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-49c4d34fb0db2969-320x226.jpg”,“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

https://x.thunkable.com/projectPage/601a3b5409a2110013ef7198

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.

@ealalin13s68
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
https://x.thunkable.com/projectPage/601b983e69be43059fb7d727

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”:“https://dl.airtable.com/.attachments/1f3d5b146299eff18cc0d43c6827fdb9/e837f5a5/The10Factorsoflive.xlsx",“filename”:"The 10 Factors of live.xlsx”,“size”:18689,“type”:“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”,“thumbnails”:{“small”:{“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-c90d94a92aef5226-32x32.jpg",“width”:32,“height”:32},“large”:{“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-49c4d34fb0db2969-320x226.jpg”,“width”:320,“height”:226}}}],“Notes”:"Info modifie”,“Name”:“Modified”,“URL”:“Https://cloudinary.com”,“Photo”:“http://res.cloudinary.com/ealalin2020/image/upload/v1611863376/piiujiqce6euhdeknr1f.jpg",“ID”:1,“Date”:“2021-01-02”,"_id":"recS8STL42p9rIJ80”}

{
“Editor”:“Alain”,
“Attachments”:[
{
“id”:“attG8nPXiowxB70VW”,
“url”:“https://dl.airtable.com/.attachments/1f3d5b146299eff18cc0d43c6827fdb9/e837f5a5/The10Factorsoflive.xlsx”,
“filename”:“The 10 Factors of live.xlsx”,
“size”:18689,
“type”:“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”,
“thumbnails”:{
“small”:{
“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-c90d94a92aef5226-32x32.jpg”,
“width”:32,
“height”:32
},
“large”:{
“url”:“https://dl.airtable.com/attG8nPXiowxB70VW-49c4d34fb0db2969-320x226.jpg”,
“width”:320,
“height”:226
}
}
}
],
“Notes”:“Info modifie”,
“Name”:“Modified”,
“URL”:“Https://cloudinary.com”,
“Photo”:“http://res.cloudinary.com/ealalin2020/image/upload/v1611863376/piiujiqce6euhdeknr1f.jpg”,
“ID”:1,
“Date”:“2021-01-02”,
“_id”:“recS8STL42p9rIJ80”
}

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://cloudinary.com" !!!
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

image

Hope this is clear

Thanks very much muneer; it works

1 Like