https://discord.gg/botpress logo
#🤝help
Pull a list of questions to ask the user from a spreadsheet.
# 🤝help
b

brave-dawn-96867

07/11/2023, 7:43 PM
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

freezing-printer-49373

07/11/2023, 7:54 PM
@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

brave-dawn-96867

07/11/2023, 7:56 PM
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

freezing-printer-49373

07/11/2023, 10:13 PM
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

full-helmet-73535

07/11/2023, 11:28 PM
@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

brave-dawn-96867

07/11/2023, 11:32 PM
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

full-helmet-73535

07/11/2023, 11:34 PM
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

brave-dawn-96867

07/11/2023, 11:35 PM
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

full-helmet-73535

07/11/2023, 11:36 PM
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

brave-dawn-96867

07/11/2023, 11:37 PM
You got it!
I often leave out details in my explanations, so no worries for the mix up. 🙂
f

full-helmet-73535

07/11/2023, 11:38 PM
Where do you have the questions store
*stored
Spreadsheet? Word doc?
b

brave-dawn-96867

07/11/2023, 11:39 PM
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

full-helmet-73535

07/11/2023, 11:39 PM
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

brave-dawn-96867

07/11/2023, 11:41 PM
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

full-helmet-73535

07/11/2023, 11:42 PM
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

brave-dawn-96867

07/11/2023, 11:43 PM
Yeah, it sounds like I've added one step too complex.
f

full-helmet-73535

07/11/2023, 11:43 PM
Dm me
l

limited-forest-26830

07/18/2023, 3:15 PM
following this
15 Views