ServisBOT BaaS is the home for mappings between the ServisBOT platform and external services such as APIs and SDKs. The easiest way to see the power of a BaaS is build one using our out-of-the box blueprints, and build a demo bot.
Blueprints can contain more than just one ServisBOT bot building block. There are blueprints for just BaaS items, or just bots with workers, and then there are also blueprints with all three.
In this example we will guide you through the steps to create and test a Yelp BaaS API connector, then extend a basic classic flow conversation with it.
Bot Army
tabRestaurantBot
Hi, how can I help?
Secrets Management
in portalCreate
Token Auth
as your Secret Type Template from the creation pageAPIKEY
with your Yelp keyBaaS API Connectors
Create
Yelp Business Directory
businessSearch
secrets
dropdown, select your recently created secretCreate Connector
will save all of your settings into the platform.Bot Army
section of portal and find your bot.RestaurantBot
Designer
which will take you to the Classic Flow canvas.
We will begin by editing the purple prompt node
Find me a restaurant
, restaurants
Drag and drop a BaaS node onto the Canvas
Name it yelp business Search
Edit the context fields
Connect up the fifth output to the BaaS node
Process the ResponseMapping
function node
onto the canvasmsg.payload.foodPlaces = msg.baas.businessSearch.response.businesses;
return msg;
property
to msg.foodPlaces
Format
to Mustache Templateoutput
to Plain textDrop a markup node onto the Canvas
Name it, and edit the message to be msg.foodPlaces
Wire the output to the back to the prompt node
Deploy and test
Deploy
in the canvas and navigate back to the bot pagesFind me a restaurant
, the bot should send you a list of restaurants in a carousel.