Adoption with fun and OpenAI

I’ve detailed how to use an API with Power Automate to inject some engaging content automatically into Microsoft Teams.

Adoption with fund and astronomy

Thanks to API’s I want to extend this to use OpenAI and ChatGPT.

What I want to achieve is to ask a question of ChatGPT via an API everyday something like this:

Tell me about 1 May as a list

When I do this interactively at chat.openai.com I see:

image

I now want something like that to appear in Microsoft Teams daily for each day.

You’ll need to head over to OpenAI and get an API key. Here’s how to do that:

How to get an OpenAI API key in just 5 easy steps

I’d also suggest signing up for an OpenAI API subscription if you want to continue using this service. Here’s an idea of the costs.

image

Create a new Scheduled cloud flow. Don’t forget to change the repeat option to 1 day typically.

image

Add the Current Time action.

Add the Convert time zone action to get the time in your location. Set the format string to Month/day pattern (i.e. May 1).

image

Add the HTTP action. Remember, this is a Premium connector. Set teh following options here:

Method = POST

URI = https://api.openai.com/v1/chat/completions

Accept = application/xml

Content-Type = application/json

Authorization = Bearer (your OpenAI API key)

Body:

{
   “model”: “gpt-3.5-turbo”,
   “max_tokens”: 2000,
   “temperature”: 0,
   “messages”: [
     {
       “role”: “user”,
       “content”: “Tell me about @{body(‘Convert_time_zone’)} as a list”
     }
   ]
}

Ensure you double check all these settings as it is easy to make a mistake.

image

Add the Parse JSON action.

I’ve put the JSON schema you need here:

https://github.com/directorcia/general/blob/master/Power%20Platform/OpenAI/JSON-for-GPT

image

Add the Initialize variable action. We need to extract the returned text and format it so it will display in Teams. That means replacing the ‘/n’ string ‘<br>’. That can be done via this expression:

replace(body(‘Parse_JSON’)?[‘choices’][0]?[‘message’]?[‘content’],’/n’,’<br>’)

NOTE: if you copy and paste this expression and receive an error when you try and save it, you’ll most likely have to change the apostrophe from ‘ to ‘. It’s subtle, but you need to use the one to the left of the ENTER key on most keyboards to get it to work in Power Automate.

image

Finally add the Post message in chat or channel action.

image

Ensure you swap to the HTML editor using the </> item in the top right of the message as shown above.

Format the message the way you want to and insert variable created previously as shown.

image

When the Flow executes the output should look something like the above.

Note that GPT isn’t always right! You can also change the AI models if you wish, but remember they have different prices.

Typically, I’d suggest you run this Flow once a day to promote more engagement in your Microsoft Team. Better yet, you can show everyone how you are integrating AI into Teams. Yet another point of engagement in your Microsoft Team and perhaps a way to spark ideas for how you can expand the use of OpenAI in yoru business.

Microsoft Defender for Endpoint: The Ultimate Solution for Endpoint Security

In today’s digital world, endpoint security is more important than ever. With the rise of cyberattacks and malware, it’s essential to have a robust security solution in place to protect your business from potential threats. One of the best options available is Microsoft Defender for Endpoint. In this blog post, we’ll take a look at the benefits of using Microsoft Defender for Endpoint to secure your business.

  1. Real-time protection: Microsoft Defender for Endpoint provides real-time protection against malware and other threats. It uses advanced threat intelligence to detect and block malicious activity, keeping your business safe from harm.

  2. Cloud-based: Microsoft Defender for Endpoint is a cloud-based solution, which means it can be accessed from anywhere with an internet connection. This makes it easy to manage and monitor your security, even when you’re on the go.

  3. Easy to use: The user interface of Microsoft Defender for Endpoint is simple and easy to navigate. This makes it easy for even the most non-technical users to manage and monitor their security.

  4. Automated security: Microsoft Defender for Endpoint automates many of the security processes, such as malware scanning and vulnerability assessments. This helps to reduce the risk of human error and ensures your security is always up-to-date.

  5. Integration with other Microsoft products: Microsoft Defender for Endpoint integrates seamlessly with other Microsoft products, such as Office 365 and Azure. This allows for a more comprehensive security solution, as well as improved collaboration and productivity.

  6. Advanced threat protection: Microsoft Defender for Endpoint offers advanced threat protection, including behavioral-based detection, machine learning, and ransomware protection. This provides an extra layer of security to keep your business safe from even the most sophisticated attacks.

  7. Compliance and regulatory standards : Microsoft Defender for Endpoint can help you meet compliance and regulatory standards, such as HIPAA and PCI-DSS. This can help to reduce the risk of fines and reputational damage caused by non-compliance.

In conclusion, Microsoft Defender for Endpoint is an excellent security solution that offers real-time protection, cloud-based management, easy usability, automation, integration with other Microsoft products, advanced threat protection and compliance and regulatory standards. It is essential for any business looking to secure their endpoints. By using Microsoft Defender for Endpoint, you can rest assured that your business is protected from potential threats and that you are meeting compliance standards.

———————————————————————————————

If you have read this far, then you’ll really know that this post is about ChatGPT rather than Microsoft Defender for Endpoint.

This is what I asked ChatGPT to do:

write a blog post on the benefits of Microsoft defender for endpoint

Now it can also generate code as well like the response to:

create a powershell script to connect to Exchange online

to which it gave me:

Here is a basic PowerShell script that can be used to connect to Exchange Online:

$UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session

This script will prompt the user to enter their Exchange Online credentials, and then create a new PowerShell session using those credentials. It will then import the session, allowing you to run Exchange Online cmdlets. You can then run command specific to your needs like, getting mails, setting mailbox etc.

It is important to note that in order to run this script, you will need to have the Exchange Online PowerShell module installed on your machine. Also, make sure that you have the necessary permissions to access the Exchange Online instance.

Of course none of these answers are ‘prefect’, however they are surprisingly good and will be for many a great time saver. If you ask people what the toughest part of any process is, most will say that just getting started is. So using ChatGPT to at least handle this task should make it far easier to kick off any process. Best of all? You can do that today!

The interesting thing for me is that at the moment ChatGPT is just a stand alone chat style question and answer application. However, what happens when it starts being integrated with other service via API calls? What happens when the power of ChatGPT increases and improves.

If you have been at this IT ‘stuff’ for a long as I have you’ve seen many ‘revolutions’ and ‘this changes everything’ moments, many of which didn’t pan out. If nothing else, I think ChatGPT has lifted consciousness about AI and what it can potentially do to the wider population audience (i.e. muggels). What happens after that is the interesting part. Will that ‘enlightenment’  kick ChatGPT to the next level or will fade back into the shadows to be reborn again in the future? Only time will tell.

However, I think that if you are interested in seeing where ChatGPT could go then start using as I have and exploring the possibilities. I can honestly say it has helped me commercially (this blog post is a good example, even the part ChatGPT didn’t write for me). The best way to sum it up at this stage is:

We always overestimate the change that will occur in the next two years and underestimate the change that will occur in the next ten. Don’t let yourself be lulled into inaction. – Bill Gates

Who knows? In a short while maybe I can automate ChatGPT to do all my blog posts and you’d never be the wiser!

Power Virtual Agents

image

Keeping with the AI theme of late:

A dedicated Microsoft Cloud Search engine

and

Need to Know Q and A Bot

I’ve also been playing around with the ability to create bots in the Power Platform. You can try out what I’ve created here:

https://bit.ly/ciapowerva

Again, remember this is a chat bot not a search engine. I have also been able to integrate this chat bot into my Microsoft Team but the process isn’t as straight forward as clicking a single link and I’ll try to cover that off in more detail in an upcoming article for you.

In many ways the Power Virtual Agent chat bot functions like the Q and A bot mentioned earlier, but it does have some major differences. Behind the scenes there is more flexibility programming than with the Q and A bot:

image

I like the ability to visually create branching logic. This makes it a lot like Microsoft Power Automate to my mind. You can also create your own custom reposes as well as import from web site information, which is what I have done in my case. I also like the follow up and after event survey responses:

image

Which is all built in.

However, from what I can see, it is also much more expensive – https://powervirtualagents.microsoft.com/en-us/

image

Given that price plus the fact that you have to invest your own time to build something, I think this isn’t likely to be too widely adopted in the SMB space as yet. I do like the platform, compared to what I have seen so far but not sure whether it is really appropriate for a ‘casual’ play. If you are serious into automation and have lots of need for this type of thing, then it is probably going to be the platform of choice. We’ll see. I need more time will all of these tools.

I can see how all of these AI platforms utilise the same core abilities that Microsoft is building underneath. They are simply layering different interfaces over the top in essence. Some are aimed more at developers, while others are aimed at power users. I am still working out where all these fit in what I am looking to achieve and I’m sure they will all continue to improve over time. That’s kinda why I’m jumping on the AI band wagon now.

I’ll be diving deep into more of what I have found and how set all this up for yourself in upcoming articles. In the meantime I suggest you go and have a think about what you’d like to automate in your business and then look at what I’ve covered so far. It is all certainly possible, but as with anything in technology, you have to determine the best tool for your own needs.

Microsoft did a good overview video on Power Virtual Agents here: https://www.youtube.com/watch?v=nWxguR5B5-s

Need to Know bot for your Microsoft Cloud Q and A

Recently I wrote an article about using Microsoft At to create,

a dedicated Microsoft Cloud Search engine

Another form of AI that is available is a chatbot service for questions and answers. Many people have seen these already on web sites, where a helpful customer service rep appears on your web page asking if you need assistance. I have now created a similar chat experience which I have christened the CIAOPS N2Kbot.

You’ll find the N2KBot here:

http://bit.ly/n2kbot

image

When you first arrive you’ll see a page like that shown above. simply enter your question in the lower line (where it says type your message” and then press enter). I haven’t as yet automated it greet you as personally I find that annoying. So for now, you can interact manually.

image

You’ll see above that if I ask “what is aip” I get a response back about Azure Information Protection.

SNAGHTML19eeb575

At the bottom of the page, you’ll also find a link to add the N2KBot to your Team if you want, as shown above.

image

You can have it as a private bot or inside a channel if you wish. Once installed you activate the bot by starting a line with @n2kbot and then asking as question, like:

@n2kbot what is aip

as shown in the above example.

What is interesting about this chatbot versus the custom search engine I created previously, is how people so far have interacted with it. Most have treated this chatbot like a search engine, expecting to give them the exact answer to the question they asked. A chatbot really isn’t that. It is basically a list of question and answer pairs. That is, if you type in this (or close to it), then answer with this. It doesn’t search the web, it looks to it’s pre-programmed question and answers pair largely.

You can prime the chatbot with your own custom questions and answers or you can target web links. Sites that have lots of FAQs (frequently asked questions) on it ingest very well into the bot. However, it is important to remember that chatbots are not search engines.

So where could I see chatbot playing a role? I think they would work well for adoption, that is people asking basic questions about OneDrive for example (i.e. “How do I upload to OneDrive”) or things like “What is Sway”. So think of chatbots more as a way to answer common questions in an automated way. When you actually sit down and have a look at how many times the same or similar questions get asked you begin to appreciate the role that chatbots could play.

I am still testing this chatbot concept out in the area of providing information specifically on the Microsoft Cloud but, as I said, I can see an initial benefit in things like adoption, which I have started working on. In an upcoming article, I’ll show you how easy it is to create a chatbot like this in Azure. However, the idea for this preliminary article is to get you thinking about:

1. The differences between chatbots and search

2. Where a chatbot may make sense in your business. That is, what information is going to help with?

Once you have that, then creating an effective chatbot will be much easier in my experience.

In the meantime, feel free to have a play with the N2KBot and let me know your thoughts. It is far from perfect and only runs on the cheapest plan, so it might be a bit slow initially when you use it. However, once ‘awake’ it should perform normally. If you have some suggestions for the questions it should be able to answer, let me know, I’m very interested to hear other people’s thoughts on this.

My aim with all this, is to get the cogs in my head turning about where this new “AI” technology can effectively be applied. They are certainly beginning to turn in mine.