๐Ÿ’พ
How To Fetch Data from a specific row in Airtable in a Computed Field
For fetching data from Airtable we will have to use an Async Computed Field

Step 1: Create the Async Computed Field

Mark the async checkbox after creating the New Computed Field
โ€‹

Step 2: Settings of the Flow

In Entire Flow --> Options --> Advance, add the Keys that we will need to identify the Airtable row from where we want to extract the data. In this case, it would be customer_id

Step 3: Generate the function for the async Computed Field

1
function result({
2
customer_id,
3
}) {
4
return fetch(`https://api.airtable.com/v0/appZTPe3D7r1qi7KA/Report%20Results/${customer_id}`, {
5
method: 'GET',
6
headers: {
7
'Authorization': 'Bearer API_KEY',
8
},
9
}).then(response => response.json())
10
.then(data => {
11
const d = data.fields
12
โ€‹
13
return d
14
})
15
}
16
โ€‹
17
โ€‹
Copied!

Step 4: Getting the Data in the Response

The Data is going to come as a JSON object, so we only need to access the fields we need by dot notation for example d.customer_id or d.main_score
1
"customer_id": "recGQGPy26Wh7nDBc",
2
"site_design_text": "This website is very good. The design is clean and clear with excellent use of spacing, colour and animation.โ€จโ€จ\nThis website stands a very strong chan...",
3
"main_comment": "This is a very good website",
4
"main_score": 100,
5
"company_url": "trysavvy.com",
6
"company_name": "Savvy",
7
"site_design_score": 25,
8
"Flow URL": "https://flows.trysavvy.com/flow/Py2LmcoIEINqAAo1Wint?customer_id=recGQGPy26Wh7nDBc"
9
}
10
Copied!
โ€‹