Airtable integration works perfectly in vscode/nod...
# 🤝help
q
Hi, when I GET from airtable api it works super in vscode but ''partialy'' in botpress execute block. here is the code const API_KEY = env.AIRTABLE const BASE_ID = '------' const TABLE_NAME = '-------' const url =
https://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 😄
Also checked cURL, it works, but something is happening in Botpress 🤔
const params = { filterByFormula:
{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 address
Works, but it is not as pretty 😢