{"id":4324,"date":"2017-12-08T06:29:35","date_gmt":"2017-12-08T14:29:35","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=4324"},"modified":"2025-06-13T16:52:25","modified_gmt":"2025-06-13T23:52:25","slug":"chatbot-azure-couchbase-viber","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/","title":{"rendered":"Chatbot on Azure and Couchbase for Viber"},"content":{"rendered":"<div class=\"paragraph\">\n<p>A chatbot can be a novel way to interact with users. After writing a post introducing the basics of <a href=\"https:\/\/www.couchbase.com\/blog\/serverless-architecture-cloud-computing\/\">serverless<\/a>, and also writing a post on writing <a href=\"https:\/\/www.couchbase.com\/blog\/azure-functions-couchbase-server\/\">Azure Functions<\/a>, I decided I would try to build something a little more practical than a &#8220;hello, world&#8221;.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Using a serverless architecture for a chatbot makes sense. Chatbot usage may be sporadic. Usage may peak and drop at various times of the day. By using serverless, you&#8217;ll only be paying for the resources and time that you need.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><em>If you want to follow along, all the source code for this blog post is <a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/092ServerlessChatbot\/src\/ViberChatbot\">available on Github<\/a>.<\/em><\/p>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_viber_chatbot\">Viber Chatbot<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>I could have chosen a lot of different platforms to create a chatbot for: Facebook Messenger, Skype, WhatsApp, and more. But I decided to go with <a href=\"https:\/\/www.viber.com\/\">Viber<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>In the United States, Viber doesn&#8217;t seem to have a huge following, but I&#8217;ve been using it a lot. It&#8217;s a very handy way to chat with my wife, send pictures, funny GIFs, and so on. I find it to be more reliable and faster than SMS, especially for pictures. I wish everyone in my family was using it! It&#8217;s also a nice side effect that <a href=\"https:\/\/www.couchbase.com\/customers\/viber\/\">Viber is a Couchbase customer<\/a>. They switched from MongoDb to support their growing data needs.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Also, <a href=\"https:\/\/developers.viber.com\/docs\/api\/rest-bot-api\/\">Viber&#8217;s REST API<\/a> is simple and well documented. Between the use of serverless architecture and Viber&#8217;s API, I couldn&#8217;t believe how fast I went from 0 to chatbot.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_setup\">Setup<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>First, You&#8217;ll need to start by <a href=\"https:\/\/viber.github.io\/docs\/general\/get-started\/\">creating a bot in Viber<\/a> (you&#8217;ll need a Viber account at some point). Viber will give you an API key that looks something like <code>30a6470a1c67d66f-4207550bd0f024fa-c4cacb89afc04094<\/code>. You&#8217;ll use this in the HTTP headers to authenticate to the Viber API.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Next, create a new Azure Functions solution. I&#8217;ve previously blogged about <a href=\"https:\/\/www.couchbase.com\/blog\/azure-functions-couchbase-server\/\">Azure Functions<\/a> with a followup on <a href=\"https:\/\/www.couchbase.com\/blog\/azure-functions-lazy-initialization-couchbase-server\/\">Lazy Initialization<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I decided to use C# to write my Azure Functions. Unfortunately, there is no .NET SDK for Viber (as far as I know), so I&#8217;ll have to use the REST API directly. Not a big deal, I just used <a href=\"https:\/\/restsharp.org\/\">RestSharp<\/a>. But if you prefer <a href=\"https:\/\/developers.viber.com\/docs\/api\/nodejs-bot-api\/\">NodeJS<\/a> or <a href=\"https:\/\/developers.viber.com\/docs\/api\/python-bot-api\/\">Python<\/a>, Viber has got you covered with SDKs for those languages.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Before you start coding, you&#8217;ll need to setup a <a href=\"https:\/\/viber.github.io\/docs\/api\/rest-bot-api\/#webhooks\">Webhook<\/a>. This is simply a way of telling Viber where to send incoming messages. You&#8217;ll only need to do this at the beginning. I did this by first deploying a barebones Azure Function that returns a 200. I used Postman to set the initial webhook.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/12\/09201-chatbot-webhook-with-postman.png\" alt=\"Chatbot webhook with Postman\"><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Finally, I setup a Couchbase cluster on Azure. <a href=\"https:\/\/www.couchbase.com\/blog\/azure-getting-started-easy-free\/\">Getting started with Couchbase and Azure is easy and free<\/a>. (You can even use the &#8220;Test Drive&#8221; button to get 3 hours of Couchbase Server without expending any Azure credit). I created a single user called &#8220;viberchatbot&#8221;, a bucket called &#8220;ViberChatBot&#8221;, and I loaded the &#8220;travel-sample&#8221; bucket.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_azure_function\">Azure Function<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>For this application, I wanted to create a chatbot with a little more substance than &#8220;Hello, world&#8221; and I also wanted to have a little fun. Here are the commands I want my chatbot to understand:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p>If I say &#8220;hi&#8221; (or hello, etc), it will respond with &#8220;Howdy!&#8221;<\/p>\n<\/li>\n<li>\n<p>If I ask for &#8220;metrics&#8221;, it will tell me how many messages it&#8217;s processed so far.<\/p>\n<\/li>\n<li>\n<p>If I mention &#8220;twitter&#8221;, it will make a recommendation about who to follow.<\/p>\n<\/li>\n<li>\n<p>If I ask for flights from CMH to ATL (or other airports) it will tell me how many flights there are today (I will use the <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/settings\/install-sample-buckets.html\">travel-sample bucket<\/a> for this data).<\/p>\n<\/li>\n<li>\n<p>If I say &#8220;help&#8221;, it will give me a list of the above commands.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>I decided not to use any natural language processing or parsing libraries. I&#8217;m just going to use simple if\/else statements and some basic string matching. If you are planning to create a robust chatbot with rich capabilities, I definitely recommend checking out libraries and tools like <a href=\"https:\/\/www.luis.ai\/home\">LUIS<\/a>, <a href=\"https:\/\/wit.ai\/\">wit.ai<\/a>, <a href=\"https:\/\/www.nltk.org\/\">NLTK<\/a> and others.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_chatbot_code\">Chatbot code<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>I started by creating a few C# classes to represent the structure of the data that Viber will be sending to my serverless endpoint.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_viber_classes\">Viber classes<\/h3>\n<div class=\"paragraph\">\n<p>This is not an exhaustive representation of Viber&#8217;s capabilities by far, but it&#8217;s enough to start receiving basic text messages.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">public class ViberIncoming\r\n{\r\n    public string Event { get; set; }\r\n    public long Timestamp { get; set; }\r\n    public ViberSender Sender { get; set; }\r\n    public ViberMessage Message { get; set; }\r\n}\r\n\r\npublic class ViberSender\r\n{\r\n    public string Id { get; set; }\r\n    public string Name { get; set; }\r\n}\r\n\r\npublic class ViberMessage\r\n{\r\n    public string Text { get; set; }\r\n    public string Type { get; set; }\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Next, the Azure function will convert the raw HTTP request into a <code>ViberIncoming<\/code> object.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">[FunctionName(\"Chatbot\")]\r\npublic static async Task&lt;HttpResponseMessage&gt; Run(\r\n    [HttpTrigger(AuthorizationLevel.Anonymous, \"get\", \"post\", Route = null)]HttpRequestMessage req,\r\n    TraceWriter log)\r\n{\r\n    var incoming = req.Content.ReadAsAsync&lt;ViberIncoming&gt;().Result;\r\n\r\n    var viber = new ViberProcessor(Bucket.Value);\r\n    viber.Process(incoming);\r\n\r\n    \/\/ return \"OK\" each time\r\n    \/\/ this is most important for the initial Viber webhook setup\r\n    return req.CreateResponse(HttpStatusCode.OK);\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>After this, I created a <code>ViberProcessor<\/code> class with a <code>Process<\/code> method that receives this object.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">public void Process(ViberIncoming incoming)\r\n{\r\n    if (incoming?.Message?.Type == \"text\")\r\n    {\r\n        LogIncoming(incoming);\r\n        ProcessMessage(incoming);\r\n    }\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_processing_viber_messages\">Processing Viber messages<\/h3>\n<div class=\"paragraph\">\n<p><code>LogIncoming<\/code> creates a record (in Couchbase) so that I know everything about each request that comes in.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>ProcessMessage<\/code> will analyze the text of the message and figure out what to do in response. You can check out the complete code on <a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/092ServerlessChatbot\/src\/ViberChatbot\">Github<\/a>, but here&#8217;s a brief snippet to give you the idea:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">\/\/ if the message contains \"hi\", \"hello\", etc say \"howdy\"\r\nelse if (HelloStrings.Any(incoming.Message.Text.ToLower().Contains))\r\n    SendTextMessage(\"Howdy!\", incoming.Sender.Id);\r\n\/\/ if message contains \"?\" then link to the forums\r\nelse if (incoming.Message.Text.Contains(\"?\"))\r\n    SendTextMessage(\"If you have a Couchbase question, please ask on the forums! https:\/\/forums.couchbase.com\", incoming.Sender.Id);\r\nelse\r\n    SendTextMessage(\"I'm sorry, I don't understand you. Type 'help' for help!\", incoming.Sender.Id);<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_getting_metrics\">Getting metrics<\/h3>\n<div class=\"paragraph\">\n<p>One of things my chatbot listens for is &#8220;metrics&#8221;. When you ask it for metrics, it will give you a count of the incoming messages that it&#8217;s processed. Since I&#8217;m logging every request to Couchbase, querying for metrics is easily done with a N1QL query.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">private string GetMetrics()\r\n{\r\n    var n1ql = @\"select value count(*) as totalIncoming\r\n                from ViberChatBot b\r\n                where meta(b).id like 'incoming::%';\";\r\n    var query = QueryRequest.Create(n1ql);\r\n    var response = _bucket.Query&lt;int&gt;(query);\r\n    if (response.Success)\r\n        return $\"I have received {response.Rows.First()} incoming messages so far!\";\r\n    return \"Sorry, I'm having trouble getting metrics right now.\";\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_sending_a_message_back\">Sending a message back<\/h3>\n<div class=\"paragraph\">\n<p>The chatbot needs to communicate back to the person who&#8217;s talking to it. As I said earlier, there is no Viber .NET SDK, so I have to create a REST call &#8220;manually&#8221;. This is easy enough with <a href=\"https:\/\/restsharp.org\/\">RestSharp<\/a>:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">private void SendTextMessage(string message, string senderId)\r\n{\r\n    var client = new RestClient(\"https:\/\/chatapi.viber.com\/pa\/send_message\");\r\n    var request = new RestRequest(RestSharp.Method.POST);\r\n    request.AddJsonBody(new\r\n    {\r\n        receiver = senderId,    \/\/ receiver\t(Unique Viber user id, required)\r\n        type = \"text\",          \/\/ type\t(Message type, required) Available message types: text, picture, etc\r\n        text = message\r\n    });\r\n    request.AddHeader(\"X-Viber-Auth-Token\", ViberKey);\r\n    var response = client.Execute(request);\r\n\r\n    \/\/ log to Couchbase\r\n    _bucket.Insert(\"resp::\" + Guid.NewGuid(), response.Content);\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Note that I&#8217;m also logging each response from Viber to Couchbase. This could be very useful information for later analysis and\/or troubleshooting. If Viber decides to change the structure and content of their response, the data in Couchbase is all stored as flexible JSON data. You will not get surprise errors or missing data at this ingestion point.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_summary\">Summary<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>That&#8217;s all the basics. Check out the source code for the complete set of actions\/operations that the chatbot can do. To test out the bot, I used my Viber app for Android on my phone (and my wife&#8217;s, to make sure it worked when I went public).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/12\/09202-viber-conversation-with-chatbot.png\" alt=\"Conversation with chatbot\"><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><em>Beware: by the time you read this, the chatbot I created will likely be taken offline. Anyone else who creates a &#8220;Couchbase Bot&#8221; is not me!<\/em><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Here&#8217;s a recap of the benefits of this approach to creating a chatbot:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p>The <a href=\"https:\/\/www.couchbase.com\/blog\/serverless-architecture-cloud-computing\/\">serverless approach<\/a> is a good way to control costs of a chatbot. Whether it&#8217;s Viber or some other messaging platform, there is potential for sporadic and cyclic use.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/viber.github.io\/docs\/api\/rest-bot-api\/\">Viber&#8217;s REST API<\/a> utilizes JSON, which makes Couchbase a natural fit for tracking\/storing\/querying.<\/p>\n<\/li>\n<li>\n<p>Couchbase&#8217;s ease of scaling and partnerships with <a href=\"https:\/\/azuremarketplace.microsoft.com\/en-us\/marketplace\/apps\/couchbase.couchbase-enterprise\">Microsoft<\/a> (and Amazon and Google) make it a great choice for a chatbot backend.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>This was really fun, and I could definitely get carried away playing with this new chatbot. It could analyze images, tell jokes, look up all kinds of information, sell products and services, or any number of useful operations.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I would love to hear what you&#8217;re doing with chatbots! Please leave a comment or contact me on <a href=\"https:\/\/twitter.com\/mgroves\">Twitter @mgroves<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A chatbot can be a novel way to interact with users. After writing a post introducing the basics of serverless, and also writing a post on writing Azure Functions, I decided I would try to build something a little more [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":4325,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1811,1816],"tags":[1245,1673,2099,1322],"ppma_author":[8937],"class_list":["post-4324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-couchbase-server","tag-cloud","tag-microsoft-azure","tag-serverless","tag-viber"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Chatbot on Azure and Couchbase for Viber - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Use a serverless approach to quickly build a chatbot. In this blog post, I&#039;ll show you an example with Azure, Couchbase, and Viber.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Chatbot on Azure and Couchbase for Viber\" \/>\n<meta property=\"og:description\" content=\"Use a serverless approach to quickly build a chatbot. In this blog post, I&#039;ll show you an example with Azure, Couchbase, and Viber.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-08T14:29:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-13T23:52:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Matthew Groves\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mgroves\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Groves\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\"},\"author\":{\"name\":\"Matthew Groves\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\"},\"headline\":\"Chatbot on Azure and Couchbase for Viber\",\"datePublished\":\"2017-12-08T14:29:35+00:00\",\"dateModified\":\"2025-06-13T23:52:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\"},\"wordCount\":1170,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg\",\"keywords\":[\"cloud\",\"Microsoft Azure\",\"serverless\",\"viber\"],\"articleSection\":[\".NET\",\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\",\"name\":\"Chatbot on Azure and Couchbase for Viber - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg\",\"datePublished\":\"2017-12-08T14:29:35+00:00\",\"dateModified\":\"2025-06-13T23:52:25+00:00\",\"description\":\"Use a serverless approach to quickly build a chatbot. In this blog post, I'll show you an example with Azure, Couchbase, and Viber.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg\",\"width\":1280,\"height\":853,\"caption\":\"mobile phone chatbot\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chatbot on Azure and Couchbase for Viber\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\",\"name\":\"Matthew Groves\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"caption\":\"Matthew Groves\"},\"description\":\"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.\",\"sameAs\":[\"https:\/\/crosscuttingconcerns.com\",\"https:\/\/x.com\/mgroves\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Chatbot on Azure and Couchbase for Viber - The Couchbase Blog","description":"Use a serverless approach to quickly build a chatbot. In this blog post, I'll show you an example with Azure, Couchbase, and Viber.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/","og_locale":"en_US","og_type":"article","og_title":"Chatbot on Azure and Couchbase for Viber","og_description":"Use a serverless approach to quickly build a chatbot. In this blog post, I'll show you an example with Azure, Couchbase, and Viber.","og_url":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-12-08T14:29:35+00:00","article_modified_time":"2025-06-13T23:52:25+00:00","og_image":[{"width":1280,"height":853,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg","type":"image\/jpeg"}],"author":"Matthew Groves","twitter_card":"summary_large_image","twitter_creator":"@mgroves","twitter_misc":{"Written by":"Matthew Groves","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/"},"author":{"name":"Matthew Groves","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58"},"headline":"Chatbot on Azure and Couchbase for Viber","datePublished":"2017-12-08T14:29:35+00:00","dateModified":"2025-06-13T23:52:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/"},"wordCount":1170,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg","keywords":["cloud","Microsoft Azure","serverless","viber"],"articleSection":[".NET","Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/","url":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/","name":"Chatbot on Azure and Couchbase for Viber - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg","datePublished":"2017-12-08T14:29:35+00:00","dateModified":"2025-06-13T23:52:25+00:00","description":"Use a serverless approach to quickly build a chatbot. In this blog post, I'll show you an example with Azure, Couchbase, and Viber.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/12\/092-hero-chat-mobile-phone.jpg","width":1280,"height":853,"caption":"mobile phone chatbot"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Chatbot on Azure and Couchbase for Viber"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58","name":"Matthew Groves","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54","url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","caption":"Matthew Groves"},"description":"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.","sameAs":["https:\/\/crosscuttingconcerns.com","https:\/\/x.com\/mgroves"],"url":"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/"}]}},"authors":[{"term_id":8937,"user_id":71,"is_guest":0,"slug":"matthew-groves","display_name":"Matthew Groves","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","author_category":"","last_name":"Groves","first_name":"Matthew","job_title":"","user_url":"https:\/\/crosscuttingconcerns.com","description":"Matthew D. Groves is a guy who loves to code.  It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything.  He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s.  He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community.  He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=4324"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4324\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/4325"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=4324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=4324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=4324"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=4324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}