Skip to content

Commit

Permalink
renaming images to samples and using the template for the README
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoag committed Oct 11, 2024
1 parent d4af458 commit dafe635
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 13 deletions.
107 changes: 94 additions & 13 deletions samples/da-SnowWizard/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
# CopilotSnowWizard
# Copilot Snow Wizard

This project demonstrates a sample implementation of an M365 Declarative Copilot that interfaces with ServiceNow to list and create incidents.
## Summary

**Note:** This is sample code and should not be used in production without thorough review. It is designed to illustrate how to build a simple Declarative Copilot using Visual Studio Code and the Teams Toolkit.
This sample project demonstrates an implementation of an M365 Declarative Copilot that interfaces with ServiceNow to list and create incidents.

| ![CopilotSnowWizard Screenshot 1](assets/2024-10-11_16-29.png) | ![CopilotSnowWizard Screenshot 1](assets/2024-10-11_16-39.png) | ![CopilotSnowWizard Screenshot 1](assets/2024-10-11_16-40.png) |
|:-------------------------------------------------------------:|:-------------------------------------------------------------:|:-------------------------------------------------------------:|


| ![CopilotSnowWizard Screenshot 1](images/2024-10-11_16-29.png) | ![CopilotSnowWizard Screenshot 1](images/2024-10-11_16-39.png) | ![CopilotSnowWizard Screenshot 1](images/2024-10-11_16-40.png) |
|:-------------------------------------------------------------:|:-------------------------------------------------------------:|:-------------------------------------------------------------:|
## Contributors
<!--
We use this section to recognize and promote your contributions. Please provide one author per line -- even if you worked together on it.
We'll only use the info you provided here. Make sure to include your full name, not just your GitHub username.
Provide a link to your GitHub profile to help others find more cool things you have done. The only link we'll accept is a link to your GitHub profile.
If you want to provide links to your social media, blog, and employer name, make sure to update your GitHub profile.
-->

* [Cristiano Goncalves](https://github.com/cristianoag)
* [Luis Demetrio](https://github.com/luisdemetrio)

## Version history

Version|Date|Comments
-------|----|--------
1.0|October 11, 2024|Initial release

## Prerequisites

## Preparing your Development Environment
* Microsoft 365 tenant with Microsoft 365 Copilot
* Visual Studio COde
* Teams Toolkit
* Node.js
* ServiceNow Developer Instance

## Minimal path to awesome

In order to run the code, you will need an M365 tenant with Copilot licenses enabled. Additionally, you must enable a policy to sideload custom applications. Without this, you will not be able to run the code. These instructions assume you have admin rights on the tenant. If you do not have admin rights, please work with your administrator to allow the upload of custom applications.

Expand All @@ -34,7 +60,7 @@ Next, you need to install the following software on your computer to use the sam
2. [Node.js](https://nodejs.org/en/download/)
3. [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension)

## Creating the ServiceNow Personal Developer Instance
### Creating the ServiceNow Personal Developer Instance

To use the sample code provided, you will need a ServiceNow Personal Developer Instance (PDI). Follow the instructions below to create your instance and familiarize yourself with the basics of ServiceNow:

Expand All @@ -53,19 +79,19 @@ It is strongly recommended to acquire basic knowledge of ServiceNow concepts. Th

For more detailed instructions and learning resources, visit [ServiceNow Basics Objectives | ServiceNow Developers](https://developer.servicenow.com/dev.do#!/learn/learning-plans/washingtondc/new_to_servicenow/app_store_learnv2_buildmyfirstapp_washingtondc_servicenow_basics_objectives).

## Download the Sample Code from GitHub
### Download the Sample Code from GitHub

If you are familiar with Git, you can clone this repository and open the `SnowWizard` folder in Visual Studio Code. If not, you can download a ZIP file containing all the content by clicking the green "Code" button at the top right corner of the repository page.

If you download the ZIP file, uncompress it on your PC and use Visual Studio Code to open the `SnowWizard` folder.

## Configuring the Declarative Copilot
### Configuring the Declarative Copilot

Once you downloaded the code and opened in with Visual Studio Code you will need to create a configuration file and provide some config information in order to make the declarative agent to interface with your ServiceNow development instance.

On Visual Studio Code, create a file named .env.local.user inside the env folder.

# ServiceNow Configuration
### ServiceNow Configuration

Create a `.env.local.user` file inside the `env` folder with the following content:

Expand All @@ -80,17 +106,17 @@ SN_PASSWORD='user_password'
- This sample code uses user credentials to interface with ServiceNow. Ensure the user has the necessary permissions to list and create incidents in ServiceNow.
- Store your credentials securely and avoid sharing them publicly.

## Install the Node.js requisites
### Install the Node.js requisites

Open a Command Prompt and navigate to the SnowWizard folder. Run NPM INSTALL and wait until all the libraries and requirements get installed.

## Run the Declarative Agent
### Run the Declarative Agent

Now on Visual Studio, click on the Teams Toolkit icon on the left rail and sign-in with your M365 tenant credentials. You do that on the Accounts section by providing your M365 tenant credentials.

Now click Preview Your Teams App (F5) and enjoy.

## Sample Prompts
### Sample Prompts

```
List all ServiceNow incidents
Expand All @@ -100,3 +126,58 @@ Create a ServiceNow incident based on the content of the text below. <provide a
```

Please note that the code is limiting the return from the ServiceNow interface in just 10 incidents. That can be easily changed by adjusting the limit on the service interface implemented by snow_incidents.ts.


## Features

List and creates Service Now incidents

<!--
Note that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions in advance! You rock ❤.
-->

<!--
RESERVED FOR REPO MAINTAINERS
We'll add the video from the community call recording here
## Video
[![YouTube video title](./assets/video-thumbnail.jpg)](https://www.youtube.com/watch?v=XXXXX "YouTube video title")
-->

## Help

<!--
You can just search and replace this page with the following values:
Search for:
YOUR-SOLUTION-NAME
Replace with your sample folder name. E.g.: my-agent
Search for:
@YOURGITHUBUSERNAME
Replace with your GitHub username, prefixed with an "@". If you have more than one author, use %20 to separate them, making sure to prefix everyone's username individually with an "@".
Example:
@waldekmastykarz
Or:
@waldekmastykarz%20@bobgerman
-->

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

You can try looking at [issues related to this sample](https://github.com/pnp/copilot-pro-dev-samples/issues?q=label%3A%22sample%3A%20YOUR-SOLUTION-NAME%22) to see if anybody else is having the same issues.

If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/copilot-pro-dev-samples/issues/new).

Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/copilot-pro-dev-samples/issues/new).

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

![](https://m365-visitor-stats.azurewebsites.net/SamplesGallery/da-SnowWizard)

0 comments on commit dafe635

Please sign in to comment.