quiet-house-75606
05/29/2024, 9:27 PMhttps://api.airtable.com/v0/${BASE_ID}/${TABLE_NAME}
const config = {
headers: {
Authorization: Bearer ${API_KEY}
,
'Content-Type': 'application/json'
}
}
const params = {
filterByFormula: {PhoneNumber} = "+18934394"
}
let x = await axios.get(url, { ...config, params })
user.userRow = x.data.records
this code filters by formula properly in vscode but not in botpress, where just outputs empty array. And the weird part is when I put comment // before filterByFormula, it properly outputs all records !? Thank you in advance for help 😄quiet-house-75606
05/29/2024, 9:33 PMquiet-house-75606
05/29/2024, 10:21 PM{PhoneNumber} = "+18934394"
}
let filterByFormula = encodeURIComponent(params.filterByFormula)
let x = await axios.get(https://api.airtable.com/v0/app---m0L4/tbl----ytLJVD1?filterByFormula=${filterByFormula}
, config)
Found this workaround by inserting encoded uri into addressquiet-house-75606
05/29/2024, 10:22 PM