Work in Progress: How To Fetch Data from a specific row in Airtable in a 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
function result({
customer_id,
}) {
return fetch(`https://api.airtable.com/v0/appZTPe3D7r1qi7KA/Report%20Results/${customer_id}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer API_KEY',
},
}).then(response => response.json())
.then(data => {
const d = data.fields
return d
})
}
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
Last updated