harsh-harlequin•17mo ago
Airtable API Call Fail
I am testing @Brendan product recommendation flow. But when ever i get to the api call its returns an error. I already double checked my token, and if the airtable base its connect to it . I don't really know what else i can do and change to test what is wrong, because i know zero about api calls and javascript.
Im attaching the image of the error message that appears in voiceflow and the video of brendan, just in case.
https://www.youtube.com/watch?v=Expi1UoJOFk&t=28s

12 Replies
Based on the error message you're encountering, it seems like there might be an issue with the way you're formatting your API request or the data you're sending to Airtable. Here are a few steps you can take to troubleshoot this issue:
1. Check your API/bearer key: Make sure you've correctly copied your API key from Airtable and pasted it in the correct place in Voiceflow. To show your bearer key, click show API key in the top right hand corner of the API documentation. If you don't have a key yet, visit your account page that will be linked in the API document.
2. Check your Authorization header: Under headers in your API Block, label the first line "Authorization". In the second line, paste your authorization key.
3. Check your request method: Make sure you're using the correct request method (GET or POST). GET is used to retrieve data from your Airtable, while POST is used to add new data.
4. Check your data format: If you're using the POST method, make sure the data you're sending to Airtable is formatted correctly. The column titles should match the Airtable column titles exactly, and the column values should match the Airtable expected data type.
5. Test your integration: Click Send Request in Voiceflow to test your API call. If it's successful, you should see a "200 OK" response.
6. Check your Airtable setup: Make sure all needed information is in your Airtable, including headers.
If you're still encountering issues after trying these steps, it might be helpful to revisit the Airtable Integration guide on Voiceflow's documentation site. This guide provides a detailed walkthrough of how to set up an Airtable and connect it to a Voiceflow assistant.
Remember, working with APIs can be complex, especially if you're new to it. Don't get discouraged if it takes a few tries to get it right. Keep experimenting and you'll get the hang of it!
You need to give the proper permissions for your Airtable API key. You might just add all permissions when testing.
harsh-harlequinOP•17mo ago
@W. Williams (SFT) you mean these?

fascinating-indigo•17mo ago
In the headers section, do you put both headers : one for bearer key and the other content-type /json?
I think this is a get request correct ? Then you need to recheck the raw body of ur code , there might be some formatting error.
From the above image u sent it seems to be an auth issue , recheck the curl link, the bearer token as well as content headers
Can you post a screenshot of your API step settings?
fascinating-indigo•17mo ago
hey @Börr try first to recreate the API call first outside VF, you can try https://hoppscotch.io/
Make sure to add your token and the right table url. If you can make it work there, you would know how to translate that into VF
And as @W. Williams (SFT) said, share a screenshot of your API step to check if we see something else there
Feel free to DM if you want me to follow up with you
typical-coral•15mo ago
Hi @JC @W. Williams (SFT) (and @Börr hope you don't mind me jumping into this thread--might help others to keep this together) I'm having a similar authentication issue. I've searched Airtable docs, VF docs, asked ChatGPT, and I can't figure out how to make the API call to Airtable using the PAT. What I'm trying to do is pull the content of a document. I followed @JC suggestion to try it outside of VF. I'd really appreciate it if you have insight. Or maybe there's an easier platform that integrates with VF like Make? (This was probably not an ideal way for me to learn how to make API Calls...🙃 )





fascinating-indigo•15mo ago
Hey @liseyloo, happyt to help. One thing to check, on the PAT page you need to select the Base for which the PAT should have access to. Once you do that it should work.
Feel free to check out this video where I explain how to connect to Airtable from a function
https://www.loom.com/share/72d389bab45d43ee826a20ab5c88c3fb
and attached you have the function code,
reach out again if you need further help, happy to assist you
typical-coral•15mo ago
Thank you so much! I had previously had tht selected, but still got an error, so I must have had something else messed up.
fascinating-indigo•15mo ago
Your request on VF looks good
Maybe is something about the API endpoint
Tomorrow we can jump on a call to take a look together, let me know
typical-coral•15mo ago
I mean it worked the last time after I selected the Base, so all good (for now, lol. I'm sure it will be a different problem tomorrow :)) Thank you again!
fascinating-indigo•15mo ago
ok, awesome! good to hear