https://discord.gg/botpress logo
#🤝help
Integration with Airtable
# 🤝help
c

chilly-church-46005

07/13/2023, 4:57 PM
Hey everyone. I'm new at BotPress and super excited about this! I'm trying to communicate with Airtable and getting this error. Any idea what I'm doing wrong? Cheers!
@brave-dawn-96867 @full-helmet-73535 Would you guys give me a hand here? Maybe some examples of how are your structuring your api calls to Airtable would be awesome!
r

rich-battery-69172

07/14/2023, 1:34 PM
Since you are getting a 404 that probably means the URL of the API call is wrong or the tableID is wrong
Probably the URL since you are getting HTML back instead of json
Tip: instead of encoding the URL like you do, try using the built in params in the second argument of axios instead
c

chilly-church-46005

07/14/2023, 1:49 PM
"built in params in the second argument of axios instead" explain please ^^
Ok I got past the error 404. But I'm still doing something wrong. I want to get the value of a field for a specific record that respects a search query. It's supposed to return the value 9. And is retrieving 0?

https://cdn.discordapp.com/attachments/1129094279348899921/1129411298564776076/image.png

r

rich-battery-69172

07/14/2023, 2:00 PM
cool! you can use
console.log(record, value)
to print the values to the console and debug it
not sure where
fieldToRetrieve
is coming from?e
c

chilly-church-46005

07/14/2023, 2:17 PM
From here

https://cdn.discordapp.com/attachments/1129094279348899921/1129416277694357594/image.png

PROGRESS. I've been able to find the record I'm searching. But whats the best way to store and print the variable? Look at the green pen

https://cdn.discordapp.com/attachments/1129094279348899921/1129439625165930496/image.png

r

rich-battery-69172

07/14/2023, 4:26 PM
yeah I think you reached the limit of the code generation field haha. you should use {{workflow.test}} instead of @test
c

chilly-church-46005

07/14/2023, 6:14 PM
Hmm how can I manage that?
4 Views