Help

api call

598 0
cancel
Showing results for 
Search instead for 
Did you mean: 
agusiglesias
4 - Data Explorer
4 - Data Explorer

in what i am working ?

i am working with a bot the bot ask questions and the response have to apered in airtable but its not working i try to fix it with a staff of botpress that is were i do the bot but they told me that it was an error of air table

const airtableAccessToken = 'patrKShGndYDE36XQ.c35584fd7450be9fba9669453b09eac22583d3aa7d584d5b42ce7ede4da3822b';

const variables = {
name: workflow.name,
email: workflow.email,
phone: workflow.phone,
budgetforproject: workflow.budgetforproject,
service: workflow.service,
adress: workflow.adress
};

const url = 'https://api.airtable.com/v0/appFWL0WUh6Sd78Im/color%20flux%2023';
const headers = {
Authorization: Bearer ${airtableAccessToken},
'Content-Type': 'application/json'
};

const response = await axios.post(url, { records: [{ fields: variables }] }, { headers });
console.log('Variables sent to Airtable:', variables);
console.log('Airtable response:', response.data);

this is the code 

i dont know where is the problem can someone help me

0 Replies 0