Pull a list of questions to ask the user from a sp...
# 🤝help
b
I want to create a bot, that would sync up with a spreadsheet or simple database like airtable, and then ask 20-50 questions from a user. I think having 50 variables in botpress might get messy and really manually intensive, so ideally I could give a client a simple sheet that they can keep up to date. Each question would ideally have an associated "help prompt" that the user could press to get some more context on how to answer the question. Bonus points if you could let a client "skip" a question. I'm thinking the answer might be something like: Variables: - Question - help prompt and some sort of looping execution that would populate Question and Help prompt with the next question... and then loop to a question node. If this is not a simple thing, I could always cave man it and just hand code for first couple of clients a massive list of variables.
f
@brave-dawn-96867 i dont want to jump the gun here, but we have something coming down the near term pipeline that should meet your requirement.
I'll keep you in mind if it goes in beta before going live
b
Oooo cool! Yeah I would need something in the next 2 weeks... so maybe I'll go the "cave man" route and make the first beta clients just make a big list of variables in botpress, and then zap it out at end to a spreadsheet.
Is there any other simple method for larger question/answer storage other than one variable per answer?
f
It should be out in next couple of weeks can't make promises, as for a temporary solution. I'm not technical myself. Maybe @acceptable-kangaroo-64719 could help
f
@brave-dawn-96867 Was working on this last night. If you have a google sheet that the customer is keeping up to date, you can use an execute code card to call the google sheets api to take the entire sheet and output it as a variable, and then feed the variable to an ai task card with the prompt loaded with the prior answers to the questions. Complex but can be done. Chat gpt can help you create the code to call the api and store into a variable, it should be pretty straightforward
b
Does that then ask a single question at a time? Or would you then create another execute code funciton to call one at a time?
f
So you can ask many questions in a row, storing them all in variables. For example: Q:what kind of pizza do you like A1: pepperoni Q: what style is your favorite? A2: Sicilian
And then the prompt you feed the ai task looks like : Create a recipe for someone who’s favorite pizza topping is {{A1}}, and their favorite style of pizza is {{A2}}.
So on and so forth
b
I probably wasn't clear in my description: I am trying to load just the questions, that would be asked. So a list of onboarding questions that need to be asked of a client, and then the answers to all 30-40 questions outputted to the company.
f
Basic example with the pizza
My apologies for not understanding. So to be clear you have a list of questions, you want to the chatbot to ask the questions, and then take all of the answers and give it back to the customer
b
You got it!
I often leave out details in my explanations, so no worries for the mix up. 🙂
f
Where do you have the questions store
*stored
Spreadsheet? Word doc?
b
I typically would store them in airtable or a spreadsheet... something simple that could be easily managed. However, I'm open to other suggestions if there is a simpler way to achieve what I'm looking for.
f
No that’s fine, just matters so I know how to answer
(Assuming you don’t know how to code) So you would take your airtable database info and give it to chat gpt, and tell it that you want to take each row and store it in a question variable, (for example q1,q2, etc)
It will write the code for you to make the api call to your airtable and then store it in the variables
Then when you put a data capture card in the chatbot, you can give it the variables in order
b
cool! yeah the AI coding is really aweosme... however, I find not knowing how to ask the question is usually the missing part.
so thanks for that. I will give that a go
f
I can do this for you if you want
Or jump on a call and show you how
There is more to do after that and you would need code at the end to take the answer variables and either put it into a new airtable, or do idk whatever you want with the answers
Put it in a doc or something and use a zap to email it to the company
b
Yeah, it sounds like I've added one step too complex.
f
Dm me
l
following this
21 Views