{"id":4606,"date":"2018-02-13T07:00:41","date_gmt":"2018-02-13T15:00:41","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=4606"},"modified":"2025-06-13T16:53:42","modified_gmt":"2025-06-13T23:53:42","slug":"alexa-skills-azure-functions-couchbase","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/","title":{"rendered":"Alexa Skills with Azure Functions and Couchbase"},"content":{"rendered":"<div class=\"paragraph\">\n<p>Alexa Skills are the &#8220;apps&#8221; that you can build to run on Amazon devices like the Echo, Echo Dot, etc. In this blog post, you&#8217;ll learn how to build an Alexa skill using serverless Azure Functions and a Couchbase backend running on Azure. This post builds on a lot of blog posts I&#8217;ve written about Azure Functions, Serverless, and Couchbase on Azure in the past:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/serverless-architecture-cloud-computing\/\">Serverless Architecture with Cloud Computing<\/a> &#8211; What is serverless?<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/azure-functions-lazy-initialization-couchbase-server\/\">Azure Functions and Lazy Initialization with Couchbase Server<\/a> &#8211; Recommendations when using Couchbase and Azure Functions together<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/chatbot-azure-couchbase-viber\/\">Chatbot on Azure and Couchbase for Viber<\/a> &#8211; A use case similar to an Alexa skill<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/azure-getting-started-easy-free\/\">Azure: Getting Started is Easy and Free<\/a> &#8211; How to use the Azure Marketplace to easily create a Couchbase Cluster<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_what_kind_of_alexa_skills_am_i_building\">What kind of Alexa skills am I building?<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>I work as a Developer Advocate, which means I often spend time at sponsor booths at developer events. I love doing this: I get to tell people how great Couchbase is, and I often get feedback from developers about what problems they&#8217;re trying to solve with Couchbase.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>If there&#8217;s one thing I don&#8217;t like about working a booth, though, it&#8217;s repetition. I often get asked the same set of questions hundreds of times per events:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p>What is Couchbase? (distributed NoSQL document database with a memory first architecture)<\/p>\n<\/li>\n<li>\n<p>How is Couchbase different than MongoDB? (they are both document databases, but Couchbase has major feature and architectural differences)<\/p>\n<\/li>\n<li>\n<p>Is Couchbase the same thing as CouchDB? (<a href=\"https:\/\/www.couchbase.com\/couchbase-vs-couchdb\/\">No.<\/a>)<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>I&#8217;m not complaining, mind you. It&#8217;s just that it&#8217;s hard to be enthusiastic when answering the question for the 100th time as the conference is about to close down.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>But you know who is always enthusiastic? Alexa! So, if I bring my Echo Dot to the next event, maybe she can help me:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><strong>What is Couchbase?<\/strong> &#8211; Alexa will say a random interesting fact about Couchbase<\/p>\n<\/li>\n<li>\n<p><strong>How is Couchbase different than MongoDB?<\/strong> Alexa will say a random architectural or feature difference.<\/p>\n<\/li>\n<li>\n<p><strong>Is Couchbase the same thing as CouchDB?<\/strong> Alexa will say &#8220;no&#8221;.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>If these Alexa skills turn out to be helpful, I can expand the skills later to answer more complex questions.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><em>If you want to follow along with this post and create your own Alexa skills, the full <a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/099AlexaAzureFunctions\/AlexaBoothDuty\">source code is available on Github<\/a>.<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_design\">Design<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Alexa skills are registered with Amazon. For the most part, they make simple HTTP requests to the endpoint that you designate and expect a certain JSON response. Azure Functions can process HTTP requests. The Azure Functions can make queries out to a database full of responses, and can also keep track of how many times each response has been given.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Below is a high-level architectural diagram of my minimum viable Alexa skills project:<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/02\/09904-architecture-diagram.png\" alt=\"Architecture diagram from you\" width=\"to an echo\" height=\"to Alexa skills\"><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_data_storage_and_design\">Data storage and design<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>The skill is going to ultimately query some data from Couchbase Server. I&#8217;ll start with 2 different kinds of documents. (If these Alexa skills turn out to be useful, I&#8217;ll add more complex stuff later).<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_document_design\">Document design<\/h3>\n<div class=\"paragraph\">\n<p>Each document represents a possible response. Each will have 3 fields:<\/p>\n<\/div>\n<div class=\"ulist\">\n<ul>\n<li>\n<p><code>type<\/code> &#8211; This will be either &#8220;mongodbcomparison&#8221; or &#8220;whatiscouchbase&#8221;.<\/p>\n<\/li>\n<li>\n<p><code>number<\/code> &#8211; The number of times this response has been used (starting at 0).<\/p>\n<\/li>\n<li>\n<p><code>text<\/code> &#8211; The text that I want the Alexa skills to say.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>The document key design of these documents is not important (at least not yet), since I&#8217;ll be using only N1QL (SQL for JSON) queries to retrieve them. However, I&#8217;ve decided to create keys like &#8220;mongo::2&#8221; and &#8220;couchbase::5&#8221;.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>To start, I will store this data in a single Couchbase node on a low cost Azure VM. A single node with a small amount of data should be able to handle even heavy booth traffic no problem. But if, for instance, I were to install these as kiosks in airports around the world I will definitely need to scale up my Couchbase cluster. <a href=\"https:\/\/www.couchbase.com\/blog\/scaling-couchbase-server-azure\/\">Couchbase and Azure makes this easy<\/a>.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_query_design\">Query design<\/h3>\n<div class=\"paragraph\">\n<p>To get a random document, I need to run a N1QL query:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">SELECT m.*, META(m).id\r\nFROM boothduty m\r\nWHERE m.type = 'mongodbcomparison'\r\nORDER BY UUID()\r\nLIMIT 1;<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>UUID is functioning as a random number generator. That&#8217;s not really what it&#8217;s for, but it&#8217;s &#8220;good enough&#8221;. If I really needed true randomness, I could make a <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/5.0\/n1ql\/n1ql-language-reference\/curl.html\">curl request<\/a> in N1QL to <a href=\"https:\/\/www.random.org\/clients\/http\/\">random.org&#8217;s API<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>To run that query, I need to create an index for the &#8216;type&#8217; field:<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-SQL\">CREATE INDEX ix_type ON boothduty(type);<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_azure_functions\">Azure Functions<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>To create an Azure Function, I used <a href=\"https:\/\/github.com\/AreYouFreeBusy\/AlexaSkillsKit.NET\">an existing .NET library<\/a> called AlexaSkills.NET, which makes it very easy to write the code you need to create Alexa skills.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>After creating my Azure Functions solution, I added it with NuGet.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_using_alexaskills_net\">Using AlexaSkills.NET<\/h3>\n<div class=\"paragraph\">\n<p>Next, I created a &#8220;speechlet&#8221; class. I chose to make my speechlet asynchronous, but a synchronous option exists as well. There are four methods that need to be created. I only really need two of them for the skill at this point.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">    public class BoothDutySpeechlet : SpeechletBase, ISpeechletWithContextAsync\r\n    {\r\n        public async Task&lt;SpeechletResponse&gt; OnIntentAsync(IntentRequest intentRequest, Session session, Context context)\r\n        {\r\n            try\r\n            {\r\n                var intentName = intentRequest.Intent.Name;\r\n                var intentProcessor = IntentProcessor.Create(intentName);\r\n                return await intentProcessor.Execute(intentRequest);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                var resp = new SpeechletResponse();\r\n                resp.ShouldEndSession = false;\r\n                resp.OutputSpeech = new PlainTextOutputSpeech() { Text = ex.Message };\r\n                return await Task.FromResult(resp);\r\n            }\r\n        }\r\n\r\n        public Task&lt;SpeechletResponse&gt; OnLaunchAsync(LaunchRequest launchRequest, Session session, Context context)\r\n        {\r\n            var resp = new SpeechletResponse();\r\n            resp.ShouldEndSession = false;\r\n            resp.OutputSpeech = new PlainTextOutputSpeech() { Text = \"Welcome to the Couchbase booth. Ask me about Couchbase.\" };\r\n            return Task.FromResult(resp);\r\n        }\r\n\r\n        public Task OnSessionStartedAsync(SessionStartedRequest sessionStartedRequest, Session session, Context context)\r\n        {\r\n            return Task.Delay(0); \/\/ nothing to do (yet)\r\n        }\r\n\r\n        public Task OnSessionEndedAsync(SessionEndedRequest sessionEndedRequest, Session session, Context context)\r\n        {\r\n            return Task.Delay(0); \/\/ nothing to do (yet)\r\n        }\r\n\r\n        \/\/ I only need to use this when I'm testing locally\r\n\/\/        public override bool OnRequestValidation(SpeechletRequestValidationResult result, DateTime referenceTimeUtc,\r\n\/\/            SpeechletRequestEnvelope requestEnvelope)\r\n\/\/        {\r\n\/\/            return true;\r\n\/\/        }\r\n    }<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>The <code>OnLaunchAsync<\/code> is the first thing that an Echo user will reach. The user will say something like &#8220;Alexa, open Matt&#8217;s booth helper&#8221;, and this code will respond with some basic instructions.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>The <code>OnIntentAsync<\/code> is where most of the Alexa skills request will be processed. I&#8217;m using a factory\/strategy code pattern here to instantiate a different object depending on which intent is being invoked (more on &#8220;intents&#8221; later).<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">public static IIntentProcessor Create(string intentName = \"FallbackIntent\")\r\n{\r\n    switch (intentName)\r\n    {\r\n        case \"MongodbComparisonIntent\":\r\n            return new MongoDbComparisonIntentProcessor(CouchbaseBucket.GetBucket());\r\n        case \"WhatIsCouchbaseIntent\":\r\n            return new WhatIsCouchbaseIntentProcessor(CouchbaseBucket.GetBucket());\r\n        case \"CouchDbIntent\":\r\n            return new CouchDbIntentProcessor();\r\n        case \"FallbackIntent\":\r\n            return new FallbackIntentProcessor();\r\n        default:\r\n            return new FallbackIntentProcessor();\r\n    }\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_connecting_to_couchbase\">Connecting to Couchbase<\/h3>\n<div class=\"paragraph\">\n<p><code>CouchbaseBucket.GetBucket()<\/code> is using <code>Lazy<\/code> behind the scenes as outlined in my <a href=\"https:\/\/www.couchbase.com\/blog\/azure-functions-lazy-initialization-couchbase-server\/\">earlier blog post on Azure Functions<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>So, whenever a &#8216;What is Couchbase&#8217; intent comes in, a <code>WhatIsCouchbaseIntentProcessor<\/code> is instantiated and executed.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">public class WhatIsCouchbaseIntentProcessor : BaseIntentProcessor\r\n{\r\n    private readonly IBucket _bucket;\r\n\r\n    public WhatIsCouchbaseIntentProcessor(IBucket bucket)\r\n    {\r\n        _bucket = bucket;\r\n    }\r\n\r\n    public override async Task&lt;SpeechletResponse&gt; Execute(IntentRequest intentRequest)\r\n    {\r\n        \/\/ get random fact from bucket\r\n        var n1ql = @\"select m.*, meta(m).id\r\n                        from boothduty m\r\n                        where m.type = 'whatiscouchbase'\r\n                        order by `number`, uuid()\r\n                        limit 1;\";\r\n        var query = QueryRequest.Create(n1ql);\r\n        var result = await _bucket.QueryAsync&lt;BoothFact&gt;(query);\r\n        if (result == null || !result.Rows.Any())\r\n            return await CreateErrorResponseAsync();\r\n        var fact = result.First();\r\n\r\n        \/\/ increment fact count\r\n        await _bucket.MutateIn&lt;dynamic&gt;(fact.Id)\r\n            .Counter(\"number\", 1)\r\n            .ExecuteAsync();\r\n\r\n        \/\/ return text of fact\r\n        return await CreatePlainTextSpeechletReponseAsync(fact.Text);\r\n    }\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Note the use of the N1QL query that was mentioned earlier (slightly tweaked so that facts with lower numbers will be given priority). This code is also using the <a href=\"https:\/\/www.couchbase.com\/blog\/sub-document-api-in-couchbase-server-4-5-with-the-net-sdk-revisted\/\">Couchbase subdocument API<\/a> to increment the &#8220;number&#8221; field by 1.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>You can view the full code of the <a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/099AlexaAzureFunctions\/AlexaBoothDuty\">other intent processors on Github<\/a>, but they are very similar (just with slightly different N1QL).<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_connecting_to_azure_functions\">Connecting to Azure Functions<\/h3>\n<div class=\"paragraph\">\n<p>Finally, once my speechlet is ready, it&#8217;s easy to wire up to an Azure Function.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight decode:true\"><code class=\"language-C#\">public static class BoothDuty\r\n{\r\n    [FunctionName(\"BoothDuty\")]\r\n    public static async Task&lt;HttpResponseMessage&gt; Run([HttpTrigger(AuthorizationLevel.Anonymous, \"get\", \"post\", Route = null)]HttpRequestMessage req, TraceWriter log)\r\n    {\r\n        var speechlet = new BoothDutySpeechlet();\r\n        return await speechlet.GetResponseAsync(req);\r\n    }\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>You can now test this locally with Postman, or with the Alexa interface once you deploy to azure.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_creating_the_alexa_skills\">Creating the Alexa skills<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>I won&#8217;t go through the whole process, since there&#8217;s plenty of documentation on how to setup Alexa skills. I think I have more work to do before my skill is officially certified, but it&#8217;s good enough for beta testing.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Once you have the Azure Functions URL, you&#8217;ll use that with Alexa. Alexa requires skills to use HTTPS, but fortunately Azure Functions come with HTTPS on a azurewebsites.net subdomain. Here&#8217;s a screenshot:<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/02\/09901-alexa-skills-https-configuration.png\" alt=\"Alexa skills HTTPS configuration with Azure Functions\"><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I mentioned &#8220;intents&#8221; earlier. These are various types of actions that Alexa skills can process, along with their inputs. Think of these like function signatures. Currently, I have designed 3 intents, and I have no parameters on these (yet). So my intent schema is a very simple piece of JSON:<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/02\/09902-alexa-skills-intent-schema.png\" alt=\"Alexa skills intent schema\"><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>For each intent, you can create &#8220;utterances&#8221; that map to the intents. These are the phrases that an Echo user will speak, and which intent they correspond to.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2018\/02\/09903-alexa-skills-sample-utterances.png\" alt=\"Alexa skills sample utterances\"><\/span><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I&#8217;ve tried to think of all the different variations. But if I really wanted this to work more generally, I would setup parameters so that a user could ask the question &#8220;What is the difference between Couchbase and {x}&#8221;.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_echo_dot_in_action\">Echo Dot in action<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>I did not publish this on the Alexa store. I did deploy it as a &#8220;beta test&#8221;, so if you want to try it out, I&#8217;d be happy to send you an invitation to get it.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Here&#8217;s a video of my trying it out on my Echo Dot (which was a speaker gift last year from the fine people at <a href=\"https:\/\/devnexus.com\/\">DevNexus<\/a>):<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>\n[youtube https:\/\/www.youtube.com\/watch?v=RaYV6jDO8Q8&amp;w=560&amp;h=315]\n<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Will this actually work at a noisy booth? Well, let&#8217;s just say I&#8217;m not ready to bring an easy chair and pillow to the booth just yet. But it&#8217;s a fun way to demonstrate the power of Couchbase as an engagement database.<\/p>\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>Alexa skills are a great place to use serverless architecture like Azure Functions. The skills will be used intermittently, and Azure Functions will only bill you for the time they are executed.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Couchbase Server again makes a great database for such an app. It can start out small to handle a single booth, but it can scale easily to accommodate larger demand.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Have a question about Couchbase? Visit the <a href=\"https:\/\/www.couchbase.com\/forums\/\">Couchbase forums<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Have a question for me? Find me on <a href=\"https:\/\/twitter.com\/mgroves\">Twitter @mgroves<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Be sure to check out all the great <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-functions\/\">documentation from Microsoft on Azure Functions<\/a>, and the documentation on the Alexa Skills <a href=\"https:\/\/github.com\/AreYouFreeBusy\/AlexaSkillsKit.NET\">.NET library<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Alexa Skills are the &#8220;apps&#8221; that you can build to run on Amazon devices like the Echo, Echo Dot, etc. In this blog post, you&#8217;ll learn how to build an Alexa skill using serverless Azure Functions and a Couchbase backend [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":3934,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1811,1816],"tags":[1673],"ppma_author":[8937],"class_list":["post-4606","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-couchbase-server","tag-microsoft-azure"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Alexa Skills with Azure Functions and Couchbase - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Alexa Skills are the &quot;apps&quot; that run on devices like the Echo. In this blog post, you&#039;ll build a skill using Azure Functions and Couchbase running on Azure.\" \/>\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\/alexa-skills-azure-functions-couchbase\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Alexa Skills with Azure Functions and Couchbase\" \/>\n<meta property=\"og:description\" content=\"Alexa Skills are the &quot;apps&quot; that run on devices like the Echo. In this blog post, you&#039;ll build a skill using Azure Functions and Couchbase running on Azure.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-13T15:00:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-13T23:53:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"922\" \/>\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=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/\"},\"author\":{\"name\":\"Matthew Groves\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\"},\"headline\":\"Alexa Skills with Azure Functions and Couchbase\",\"datePublished\":\"2018-02-13T15:00:41+00:00\",\"dateModified\":\"2025-06-13T23:53:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/\"},\"wordCount\":1455,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg\",\"keywords\":[\"Microsoft Azure\"],\"articleSection\":[\".NET\",\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/\",\"name\":\"Alexa Skills with Azure Functions and Couchbase - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg\",\"datePublished\":\"2018-02-13T15:00:41+00:00\",\"dateModified\":\"2025-06-13T23:53:42+00:00\",\"description\":\"Alexa Skills are the \\\"apps\\\" that run on devices like the Echo. In this blog post, you'll build a skill using Azure Functions and Couchbase running on Azure.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg\",\"width\":1920,\"height\":922,\"caption\":\"National Cloud Database Day\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Alexa Skills with Azure Functions and Couchbase\"}]},{\"@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":"Alexa Skills with Azure Functions and Couchbase - The Couchbase Blog","description":"Alexa Skills are the \"apps\" that run on devices like the Echo. In this blog post, you'll build a skill using Azure Functions and Couchbase running on Azure.","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\/alexa-skills-azure-functions-couchbase\/","og_locale":"en_US","og_type":"article","og_title":"Alexa Skills with Azure Functions and Couchbase","og_description":"Alexa Skills are the \"apps\" that run on devices like the Echo. In this blog post, you'll build a skill using Azure Functions and Couchbase running on Azure.","og_url":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/","og_site_name":"The Couchbase Blog","article_published_time":"2018-02-13T15:00:41+00:00","article_modified_time":"2025-06-13T23:53:42+00:00","og_image":[{"width":1920,"height":922,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg","type":"image\/jpeg"}],"author":"Matthew Groves","twitter_card":"summary_large_image","twitter_creator":"@mgroves","twitter_misc":{"Written by":"Matthew Groves","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/"},"author":{"name":"Matthew Groves","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58"},"headline":"Alexa Skills with Azure Functions and Couchbase","datePublished":"2018-02-13T15:00:41+00:00","dateModified":"2025-06-13T23:53:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/"},"wordCount":1455,"commentCount":3,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg","keywords":["Microsoft Azure"],"articleSection":[".NET","Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/","url":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/","name":"Alexa Skills with Azure Functions and Couchbase - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg","datePublished":"2018-02-13T15:00:41+00:00","dateModified":"2025-06-13T23:53:42+00:00","description":"Alexa Skills are the \"apps\" that run on devices like the Echo. In this blog post, you'll build a skill using Azure Functions and Couchbase running on Azure.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/08\/074-hero-Azure-Clouds.jpg","width":1920,"height":922,"caption":"National Cloud Database Day"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/alexa-skills-azure-functions-couchbase\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Alexa Skills with Azure Functions and Couchbase"}]},{"@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\/4606","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=4606"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/4606\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/3934"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=4606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=4606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=4606"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=4606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}