https://discord.gg/botpress logo
#🤝help
API parameters
# 🤝help
b

billions-queen-32038

07/21/2023, 4:59 PM
I’m following the recipe bot video, and have integrated my own api instead of the recipe one. I am new to JavaScript and just wanted to know which parameters should I change accustomed to my api ?

https://cdn.discordapp.com/attachments/1131993925419286630/1131993925599645827/Screen_Shot_2023-07-21_at_12.56.02_PM.png

c

cool-flag-29807

07/21/2023, 6:04 PM
If your own api is connected to google sheets, just get your data from there
No need for params or other stuff
Then copy this to executive code
const cards = [] const filteredCars = workflow.recipeInfo.filter(car => car.carname.toLowerCase().includes(workflow.carModel.toLowerCase())) for (let i = 0; i < filteredCars.length && i < 16; i++) { const car = filteredCars[i] cards.push({ title: car.carname, subtitle:
${car.yearandmileage} | ${car.price}
, image_url: car.imageURL, // include the image in the card // Add the appropriate action fields here }) } workflow.cards = cards
In my case i want to get data of carname and push it to title in card
In sheet it needs to written as carname
So it will take it from there
Same for others after car.
carModel is a variable i collected before