How to create a Dynamic Knowledge Base (Receiving ...
# 📖tutorials
g
Hey everyone, this is one of the biggest issues I've had so far and it was a truly nerve wrecking process figuring this out! But finally, with the help of the amazing @famous-jewelry-85388 , we found a way to create a Dynamic Knowledge Base (or just receive information in Botpress from an outside source) that you or your customer can update on demand. So let's get straight to it. **Option 1**: Using Zapier Both options are using Google Sheets as the main data source (You put data in a Google Sheet that is then sent to a BP Table that's being used as a Knowledge Base). Zapier has a direct integration with Botpress, so if you need it for a personal project or just don't mind the pricetag of Zapier, that's the better option. Step 1: Zapier Setup 1. Start a New Zap in Zapier - All you need is a 2 step Zap, having Google Sheets as a Trigger and a Botpress event as an action (Might sound a bit complicated if you've never used Zapier before, but it's very intuitive, just dive right in and it will take you there) 2. After connecting the Sheet with Botpress, make sure the data transfer is being done in the JSON format like shown in the first pic 3. Test it out to make sure the Zap is collecting the right data and it's sending an event to Botpress Step 2: BP Setup 1. Create a table in BP and assign it as a KnowledgeBase for your bot 2. Create a Trigger node, insert an "Event from Zapier" card and connect it to a Node containing an "Insert Record" card. (As shown on the 2nd pic below) 3. Make sure the data received is again in the JSON format in every field as shown on the screenshot. Here's a quick example of the format so you can copy-paste: {{JSON.parse(event.payload.data).INSERT YOUR VARIABLE HERE}} 4. To be able to receive the data, PUBLISH your bot before testing.
f
Thanx 😀
3 Views