https://discord.gg/botpress logo
#🤝help
Dynamic Knowledge Base
# 🤝help
q

quick-sunset-51605

06/29/2023, 7:39 PM
Hi I'd like to have a knowledge base that can be updated separately from the bot and the bot will automatically use the new material without republishing. I tried giving a google doc link but it didn't work. Is what I'm looking for possible?
f

faint-continent-64566

06/30/2023, 7:04 PM
Same Problem. Bumbing this thread up. @quick-sunset-51605
@acceptable-gold-88171
a

acoustic-hair-60678

06/30/2023, 10:55 PM
Here's the thread to upvote on feature requests https://discord.com/channels/1108396290624213082/1124414296470863985
h

hallowed-waiter-46283

07/14/2023, 11:25 PM
Was just looking for this too, even with a google sheet spreadsheet. I have a database that is constantly updating so that's why I'm interested in this.
r

rapid-architect-31536

07/20/2023, 11:39 AM
me too, we real time update inventory in Google sheet.
a

acoustic-hair-60678

07/22/2023, 4:35 AM
with the new tables feature that just released, it's possible that this use case can work with them. we'll be releasing documentation and tutorials so keep an eye out on our youtube channel
m

melodic-barista-55125

07/25/2023, 2:33 AM
I'm using a webhook with make.com to keep a botpress table in sync with a google spreadsheet (the webhook returns some json and iterates through and updates the table). Is there going to be additional functionality to streamline this?
a

acoustic-hair-60678

07/25/2023, 2:42 AM
hi goodwood, we're still in the early stages of tables so we'll be adapting to how our users want to use the new feature. feel free to post on #1111026806254993459 if there's a specific functionality you'd like to see
m

melodic-barista-55125

07/25/2023, 2:47 AM
Thanks. Can you say if we be able to use tables as a knowledgebase?
a

acoustic-hair-60678

07/25/2023, 2:58 AM
towards the end of the office hours last week we hinted at how tables & KBs can interplay we each other. here's the recording: https://discord.com/channels/1108396290624213082/1132041248526581830/1132454796775936153
a

adamant-laptop-15168

08/02/2023, 1:01 AM
Hey man, can you teach me how to do that?
m

melodic-barista-55125

08/02/2023, 1:59 AM
Sure, I can post some screenshots when I get in front of a computer.
a

adamant-laptop-15168

08/02/2023, 2:11 AM
Thank you so much!
m

melodic-barista-55125

08/02/2023, 3:45 PM
Ok here goes. I use an Execute Code card to call a scenario in Make.com using a webhook. The scenario activates due to the webhook, gets the values from a google spreadsheet, aggregates the data and saves it to a json element, then returns it to Botpress using the webhook response. In the same Execute Code card it then removes all data from the Table and inserts the updated data.
Code:
Copy code
const currentDateAndTime = luxon.DateTime.now().toISO()
const webhookUrl = 'https://hook.us1.make.com/<your_scenario_id>'
try {
  const response = await axios.post(webhookUrl, { currentDateAndTime })
  const webhookResponse = response.data
  console.log(webhookResponse)
  const { sheetsData } = webhookResponse // Extract the array
  console.log(sheetsData)
  await removeAllRecords()
  await insertRecords(sheetsData)
} catch (error) {
  console.log(error)
}

async function removeAllRecords() {
  try {
    const data = await SheetsDataTable.findRecords({ selectorName: 'allRecords' })
    const recordIDsToDelete = data.map((data) => data.id)
    await SheetsDataTable.deleteRecords(recordIDsToDelete)
  } catch (error) {
    console.log(error)
  }
}

async function insertRecords(sheetsData) {
  try {
    await SheetsDataTable.createRecords(sheetsData)
  } catch (error) {
    console.log(error)
  }
}
And here is the Make.com scenario. JSON documentation here: https://www.make.com/en/help/tools/json
a

adamant-laptop-15168

08/02/2023, 5:44 PM
Thank you so much! That is amazing
a

acoustic-hair-60678

08/04/2023, 12:17 AM
this is really awesome. goodwood, would you mind posting this on #1132038253109837994? i think this is something the community would love to learn how to do.
m

melodic-barista-55125

08/04/2023, 1:28 PM
Thanks! Sure I can give it a shot, but might have to wait until next week when I have more time. Although it's fairly limited right now because tables can't be used as KB's and when I pass the info from the table to AI it really struggles (i.e. it can't reliably do math or relay accurate information based on the columns). I'm really interested to see how the native AI fares in comparison when you release the feature to use tables as KB's. (if there is a beta for that I'd love to join btw!!)
c

curved-traffic-50479

08/04/2023, 4:11 PM
Me too i would love to test it @rich-battery-69172 is there any way to access it early as developers?🥹
l

limited-forest-26830

08/07/2023, 2:16 PM
i like this
c

curved-traffic-50479

08/07/2023, 2:47 PM
Its coming
m

melodic-barista-55125

08/09/2023, 3:30 PM
29 Views