AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Connect your Bot to the World - XML, JSON, Web Services, HTML Scraping, Twitter, Facebook, Telegram, Email
 
 

This article discusses connecting bots to XML and JSON web services, to let your bot access the world.

It uses the AIML SRAIX tag with a “service” of “XML” or “JSON” to call web services. Or uses the Bot Libre “Self” JavaScript dialect.

Example,

<aiml>
  <
category>
    <
pattern>Guess where I live</pattern>
    <
template>What is your postal code?</template>
  </
category>
  <
category>
    <
pattern>*</pattern>
    <
that>What is your postal code</that>
    <
template>You live in <sraix service="XML" hint="code/name">http://api.geonames.org/postalCodeSearch?maxRows=1&username=demo&postalcode;=<star/></sraix>.</template>
  
</category>
</
aiml

https://www.botlibre.com/forum-post?id=13020078

Also shows how to scrap info from HTML pages, and post to Facebook, Twitter, Telegram, email, etc.

 

 

 
  login or register to react