From dafe63526d0b5989b4c8b4ecd256caa6e60f35b7 Mon Sep 17 00:00:00 2001 From: Cristiano Goncalves Date: Fri, 11 Oct 2024 18:01:13 -0300 Subject: [PATCH] renaming images to samples and using the template for the README --- samples/da-SnowWizard/README.md | 107 +++++++++++++++--- .../{images => assets}/2024-10-11_16-29.png | Bin .../{images => assets}/2024-10-11_16-39.png | Bin .../{images => assets}/2024-10-11_16-40.png | Bin 4 files changed, 94 insertions(+), 13 deletions(-) rename samples/da-SnowWizard/{images => assets}/2024-10-11_16-29.png (100%) rename samples/da-SnowWizard/{images => assets}/2024-10-11_16-39.png (100%) rename samples/da-SnowWizard/{images => assets}/2024-10-11_16-40.png (100%) diff --git a/samples/da-SnowWizard/README.md b/samples/da-SnowWizard/README.md index ef50cc3..f48eea7 100644 --- a/samples/da-SnowWizard/README.md +++ b/samples/da-SnowWizard/README.md @@ -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 + + +* [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. @@ -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: @@ -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: @@ -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 @@ -100,3 +126,58 @@ Create a ServiceNow incident based on the content of the text below. + + + +## Help + + + +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) diff --git a/samples/da-SnowWizard/images/2024-10-11_16-29.png b/samples/da-SnowWizard/assets/2024-10-11_16-29.png similarity index 100% rename from samples/da-SnowWizard/images/2024-10-11_16-29.png rename to samples/da-SnowWizard/assets/2024-10-11_16-29.png diff --git a/samples/da-SnowWizard/images/2024-10-11_16-39.png b/samples/da-SnowWizard/assets/2024-10-11_16-39.png similarity index 100% rename from samples/da-SnowWizard/images/2024-10-11_16-39.png rename to samples/da-SnowWizard/assets/2024-10-11_16-39.png diff --git a/samples/da-SnowWizard/images/2024-10-11_16-40.png b/samples/da-SnowWizard/assets/2024-10-11_16-40.png similarity index 100% rename from samples/da-SnowWizard/images/2024-10-11_16-40.png rename to samples/da-SnowWizard/assets/2024-10-11_16-40.png