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.
Hi, how can I help?
Secrets Managementin portal
Token Authas your Secret Type Template from the creation page
APIKEYwith your Yelp key
BaaS API Connectors
Yelp Business Directory
secretsdropdown, select your recently created secret
Create Connectorwill save all of your settings into the platform.
Bot Armysection of portal and find your bot.
Designerwhich will take you to the Classic Flow canvas.
We will begin by editing the purple prompt node
Find me a restaurant,
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 nodeonto the canvas
msg.payload.foodPlaces = msg.baas.businessSearch.response.businesses; return msg;
Formatto Mustache Template
outputto Plain text
Drop 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
Deployin the canvas and navigate back to the bot pages
Find me a restaurant, the bot should send you a list of restaurants in a carousel.