Import or use a database

hi everyone,
I’m trying to create a chatbot that get data from a database (google sheet or other).

The idea is that the chatbot will ask some questions to the user and put each information in a variable in botpress. After that, I would like the chatbot to compare the different variable to my database and display some data of my database to the user.

Is there a way to do this ?
Thank you so much !!

Hi @naccache.p ,

Step 1: Create a workflow variable (type: Object)

Step 2: Select Execute Code Card and use the below code to send an API Request.

try { const response = await axios.get('') workflow.response= } catch (error) { console.error(error) }

Step 3: Add a text card with workflow.variable.parameter after the execute code card.

Did that cover your question?

Thank you so much for your answer !
I will try to do it and I will let you know :slight_smile:

@naccache.p sounds good! I will be waiting your feedback. Happy bot building :rocket: