How to create a sample nodejs bot which utilizes Azure Functions in 15 minutes

In this article I will demonstrate how to create a nodejs bot hosted in Azure. The bot will be created from a sample provided from Microsoft. The example bot will use Azure Functions as the trigger for it’s communication. You will need a Microsoft Azure account to be able to follow this process for yourself. This is only an introduction on how to get up and running, more steps in the process will come later.

Introduction 

Looking at the documentation on how to create a test a nodejs bot within the Microsoft Bot Framework can be found in the Microsoft documentation (What is Bot Builder for Node.js and why should I use it?).

I found another more interesting (less CLI) way to do it through Azure portal. As I work my way through figuring out how all this works I expect there will be a number of blog posts as there is a lot to talk about. This post is focused on getting us up and running.

As of February 2017 this Bot Service is in Preview and the process may change before it goes GA later in the year !

Creating a bot service in Azure

Within your Azure portal create a new instance of a bot service from within Intelligence and Analytics.

bot1

Give it a name and resource group

bot2

and create.

Once created you will be able to access your bot from your portal resources pane.

Setting up your service

Opening your new service for the first time, you’ll be presented with the form to create an AppId and secret password for your bot. Follow the prompts and get back to the screen to create a sample bot.

bot3

We are going to select NodeJS and create an azure function bot for the sake of demo

bot4

and then we wait……Ho hum, I wonder what’s going on in the background – probably magic….

bot5

Developer interface

Once the bot has been created you will be presented with a web based IDE showing you the node code and a chat window on the right.


bot6

You can talk to yourself!! Something I like to do all the time…..apparently….

bot9

Back in Azure Portal

In setting up all this up, Azure auto-magically created a number of new services have been created in the Azure Portal to manage this functionality(which is why we had to wait for the background magic earlier). We can now see the following services making all this happen.

bot8

How it works and how it is happening will come in future blog posts. For the moment we are up and running……and this blog post is getting long enough already.

Conclusion

This entire process took no more than about 15 minutes to complete. There is a lot more to explore around the deployment of the bot and the further development thereof, but for the moment we are up and running with a bot and Azure Functions (at least in development).

PS

I now have a nagging feeling that this is cool and all, but I really should check and understand how much those new magic services are going to cost…….

NWCJS meetup – Angular 2 for beginners

Next week, PSC is hosting the 6th meeting of the Northwest Chicago JavaScript meetup group – seems very quickly that we have got to 6 months and we’re stall having fun and blowing some minds 🙂

This time around we are very honored to have David Giard, the regional Microsoft Technical Evangelist coming and talk to us. TypeScript is being used by the Angular development team at Google and it is amazing to see collaboration between the two companies who in other ways are always competing against each other.

Come and see what all the noise is about Angular 2 – Pizza and “refreshments” will be provided 🙂

http://bit.ly/2kLMS1w

 

Angular 2 for Beginners by David Giard .

Angular 2 is a JavaScript framework that helps you build rich, interactive Single Page Applications.

This presentation will cover the basics of Angular 2 and the advantages of TypeScript – a language that adds features to JavaScript, including strong typing. You will learn about data binding, event binding, routing, and observables.

David Giard is a Technical Evangelist at Microsoft .  

 

 

 

What do Apple Airpods and Spongebob Squarepants have in common?

So in an uncommonly, just for the hell of it, post I wanted to share something techie but just for the sake of amusement. When my family was looking at the new AirPods online we noticed something rather amusing……for those of you who don’t watch Spongebob Squarepants you won’t get this, but we are talking about this guy – Mr Krabs

Mr Krabs looking angry when he realized these are earphones $159.00 

cr4

Mr Krabs scared back into his AirPod shell

cr2

Mr Crabs wide eyed stare

cr3

Mr Krabs spying on his customers

cr1

and Finally you’re never going to look at this the same way again….

iPhone, iPhone, Angry and Scared Mr Krabs

cr5

Five years of blogging and personal growth

So it’s been just over five years since my first blog post – I’d just been to an IBM conference and been inspired to do something about my career in a way I wasn’t expecting. To the day, it is five years since I registered xomino.com. My reasoning was to make myself more employable than I had ever been before. I wanted to get involved in the XPages community, express myself and see what happened……So a quick summary and time for self reflection. Five years ago I made the best decision of my professional career, and I had no idea what I was doing at the time 🙂

  • 388 published blog posts (including this one)
  • 380,000 page views
  • Got a job at PSC Group
  • Spoke 3 times at IBM’s global ICS conference
  • Spoke at InterConnect IBM’s global cloud conference
  • Spoke at Dreamforce, Salesforce’s global conference
  • Spoke remotely at a conference in Australia (that was weird but cool)
  • Spoke at a conference in the Netherlands
  • Spoke at a SharePoint conference
  • Spoke at multiple other events online and on stage
  • 3 times IBM ICS Champion
  • 1 time IBM Cloud Champion
  • 1 time Microsoft MVP

All in it’s worked out rather well actually. I’ve made some lifelong friends along the way, and got to work with some incredible people. It has been a blast and all because I stood up in front of several hundred people and made an ass of myself back in 2012….I wholeheartedly recommend it to anyone 🙂

 

Azure Machine Learning Studio Office Add-In

I am currently in the process of learning more about Azure Machine Learning Studio . Within there you can create and train predictive models. As I am going through some of the examples I came across a great example of an Office Add-In.

I am creating a simple weather predicting example based on data I downloaded from an API service. More on that later. From my model I created a sample Web Service with the click of a button. This exposes an End point for me to send data to be “predicted on”.

a2

When you create a Web Service from your trained model you can access a test screen through the application.

a1

 

From there I spotted a link to an Excel App and I figure I would see what was going on there. Turns out it is an Office Add-In… !!

When the Excel sheet opened I was presented with the option to test the web service

a3

Once you load your test data into the sheet you can then use the Add-In to select the data to test – and designate where the answer will be added back to the sheet.

a4

And you push Predict !!!

Looking at the application using the F12 tool we can see the hosted Office Add-In location and also see the prediction in action.

a7

a5

The web service is called and the response is a JSON string with all the answers and the scored confidence in the answer.

The Add-In then inserts those answers back into the Excel spreadsheet for you

a6

As you can see, my predicting needs some work but the Add-In and sample web service worked like a charm !!!

Poking around the site I can see it is built using Knockout.js and some jQuery – very cool 🙂

a8

Once I have properly figured out how this all Machine Learning lark works I am going to create some blog posts on the predictive side of this – but I wanted to share how cool this out of the box for free Add-In is

GREAT USE CASE !!

 

Predictive Analysis and Machine Learning

Each year in January I pick a topic which is going to be my learning focus for the year. Partly because I started back in January 2012 (yeah 5 years !!) but also because it creates a basis of knowledge and information to speak on during the coming year. Previous years have been

  • 2012 – jQuery
  • 2013 – ExtJS
  • 2014 – Angular
  • 2015 – Bluemix
  • 2016 – MS Office Add-Ins

While Predictive Analysis and Machine Learning are not exactly “Emerging Technologies” their wide spread use is becoming so. With the significant uptick in IoT and data collection in general there is a growing feeling that this field will become mainstream this year. This is an area of personal and professional interest and I have been looking into it for a couple of months so far.

I have no significant aspirations to become a professional Data Scientist, but I do believe there is very meaningful ways predictive analytics can be integrated into our business solutions.

As normal my main goal of blogging is for personal reference and to build a knowledge base for myself (and others if they want to listen). I guess we will see how it goes 🙂

 

19 Jan – Speaking at Northwest Chicago JavaScript meetup – Office.js

We have been hosting the NWCJS meetup here at PSC Group for the past few months. We have had some great speakers talking about React Native, How Chrome works under the covers, ES6, Web Components and others. This time it is my turn to speak.

I am going to be talking about Office.js the framework library which is the underpinning of Office Add-Ins. I will be talking about how the framework works, how it’s intended to be used and present lots of examples of how you can use JavaScript alone to automate functionality within the Office suite of products (Word, Excel, Outlook etc). The Office.js library is intended to replace the main functionality of VBA but in a way that works not only on Windows machines, but also on the web and on Mac clients.

For more information on time and place check it out 🙂

Office.js

Thursday, Jan 19, 2017, 6:00 PM

PSC Group, LLC
1051 Perimeter Drive Suite 500 Schaumburg, IL

21 Javascripters Attending

Office.js – Using JavaScript to build functionality into Microsoft Office by Marky RodenMarky Roden is Principal Architect for the PSC Group LLC and Head of the PSC Labs emerging technologies group, tasked with using cutting edge technologies to transform solutions offerings for customers.**************Schedule 6:00 – begin arriving and sociali…

Check out this Meetup →