Integration with Airtable
# 🤝help
c
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
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
"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
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
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
yeah I think you reached the limit of the code generation field haha. you should use {{workflow.test}} instead of @test
c
Hmm how can I manage that?
4 Views