Skip to content

Commit a4f2453

Browse files
authored
Merge pull request #9 from sim-1one/copilotstudio
Copilotstudio
2 parents f31c8c3 + 4dd1b81 commit a4f2453

File tree

108 files changed

+4066
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+4066
-0
lines changed

CopilotAgent/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<h3>Microsoft Azure AI for Operation Framework Copilot Agent</h3>
2+
3+
4+
<h2>Prerequisites</h2>
5+
6+
7+
Required licenses:
8+
- Copilot Studio Developer Licenses (Microsoft 365 Copilot Studio) | 1 * Developer
9+
- Power Automate Premium | 1 * User
10+
- Microsoft Teams | 1* User
11+
12+
Required Solution:
13+
- Copilot Studio Agent
14+
15+
<h2>Copilot Studio creation</h2>
16+
17+
Before proceeding with Copilot Studio Agent creation, ensure to have assigned the required Copilot Studio Developer Licenses in <a href="https://admin.microsoft.com/#/homepage">"Microsoft 365 Admin Center"</a>. After that continue with the agent creation.
18+
19+
Open <a href="https://copilotstudio.microsoft.com/">"Microsoft Copilot Studio Portal"</a>. Click on New Agent:
20+
21+
![New Agent](./images/new-agent.jpg )
22+
23+
In the top right corner, click on Skip to configure:
24+
25+
![skip](./images/skip.jpg )
26+
27+
In this page fill all required sections and then click on create:
28+
29+
![Create agent](./images/agent-name.jpg )
30+
31+
Disable the GenAI orchestration clicking on Settings and set No:
32+
33+
![Setting](./images/Setting.jpg )
34+
35+
![Response](./images/Setting-response.jpg )
36+
37+
38+
At this point the new agent has been created. On the headers click on Topic, and then add topic :
39+
40+
![Topic](./images/add-topic.jpg )
41+
42+
From blank
43+
44+
![FromBlank](./images/from-blank.jpg )
45+
46+
Follow the istructions below:
47+
48+
49+
**Solution Name** | **Information** | **Configuration** |
50+
| ------------- | ------------- | ------------- |
51+
| Copilot topic Update Manager | Topic used to integrate Update Manager with Copilot Studio | [Configuration Link](./UpdateManager/README.md) |
52+
| Copilot topic FinOps | Topic used to integrate FinOps to Copilot Studio | **work in progress** |
53+
54+
55+
56+
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
<h3>Azure UpdateManager Copilot Studio Flow - OneTimeUpdate</h3>
2+
3+
<img src="./images/1 start.png" alt="1" width="800" >
4+
5+
Click on "+" and create "Initialize Variable" :
6+
7+
<img src="./images/2 query graph.png" alt="2" width="800" >
8+
9+
Call the variable "querygraph", set it as a String and past the following query as a value:
10+
11+
```querygraph
12+
resources
13+
| where name =~ "@{triggerBody()?['text']}"
14+
```
15+
16+
Click again on "+" and select again "Initialize Variable", call it "apiversion" :
17+
18+
<img src="./images/3 create api version varaible.png" alt="3" width="800" >
19+
20+
After the variables creation place an "HTTP request" block and fill all the required information:
21+
22+
<img src="./images/4 HTTP Request.png" alt="HTTPRequest" width="800" >
23+
24+
<img src="./images/4-1 HTTP request.png" alt="HTTPRequest4-1" width="800" >
25+
26+
After HTTP request creation place and Parse JSON block and use the "body" output as a content.
27+
28+
<img src="./images/5 parse json.png" alt="parseJSON" width="800" >
29+
30+
Copy and past the schema:
31+
32+
```schema
33+
{
34+
"properties": {
35+
"extendedLocation": {},
36+
"id": {
37+
"type": "string"
38+
},
39+
"identity": {},
40+
"kind": {
41+
"type": "string"
42+
},
43+
"location": {
44+
"type": "string"
45+
},
46+
"managedBy": {
47+
"type": "string"
48+
},
49+
"name": {
50+
"type": "string"
51+
},
52+
"plan": {},
53+
"properties": {
54+
"properties": {
55+
"classifications": {
56+
"items": {
57+
"type": "string"
58+
},
59+
"type": "array"
60+
},
61+
"kbId": {
62+
"type": "string"
63+
},
64+
"lastModifiedDateTime": {
65+
"type": "string"
66+
},
67+
"patchId": {
68+
"type": "string"
69+
},
70+
"patchName": {
71+
"type": "string"
72+
},
73+
"publishedDateTime": {
74+
"type": "string"
75+
},
76+
"rebootBehavior": {
77+
"type": "string"
78+
}
79+
},
80+
"type": "object"
81+
},
82+
"resourceGroup": {
83+
"type": "string"
84+
},
85+
"sku": {},
86+
"subscriptionId": {
87+
"type": "string"
88+
},
89+
"tags": {},
90+
"tenantId": {
91+
"type": "string"
92+
},
93+
"type": {
94+
"type": "string"
95+
},
96+
"zones": {}
97+
},
98+
"type": "object"
99+
}
100+
```
101+
102+
Now we need to create a "machineid" variable, paste the code below inside the value :
103+
104+
<img src="./images/6 machineid.png" alt="6" width="800" >
105+
106+
```function
107+
body('Parse_JSON')?['data']?[0]?['id']
108+
```
109+
110+
Create a condition block:
111+
112+
<img src="./images/7 condition.png" alt="7" width="800" >
113+
114+
In the false section set the variable "api version azmv" following the example:
115+
116+
<img src="./images/7 false.png" alt="7" width="800" >
117+
118+
In the True section set the variable "api version ARC" following the example:
119+
120+
<img src="./images/7 true.png" alt="7" width="800" >
121+
122+
Create invoke resource operation and fill the required parameters following the example:
123+
124+
<img src="./images/8 invoke resource.png" alt="8" width="800" >
125+
126+
```code
127+
Subscritpion: body('Parse_JSON')?['data']?[0]?['subscriptionId']
128+
Resource Group: body('Parse_JSON')?['data']?[0]?['resourceGroup']
129+
Resource Provider: first(split(body('Parse_JSON')?['data']?[0]?['type'], '/'))
130+
Short Resource ID: machines/@{triggerBody()?['text']}
131+
Client Api Version: @{variables('apiversion')}
132+
Action name: installPatches
133+
134+
Body:
135+
{
136+
"maximumDuration": "PT120M",
137+
"rebootSetting": "IfRequired",
138+
"windowsParameters": {
139+
"classificationsToInclude": [
140+
"Security",
141+
"UpdateRollup",
142+
"FeaturePack",
143+
"ServicePack",
144+
"Critical",
145+
"Definition",
146+
"Tools",
147+
"Updates"
148+
]
149+
}
150+
}
151+
```
152+
Now we need to create a "StatusCode" variable :
153+
154+
<img src="./images/9 status code.png" alt="9" width="800" >
155+
156+
Create a condition block:
157+
158+
<img src="./images/10 condition.png" alt="7" width="800" >
159+
160+
In the false section set the variable "StatusCode" following the example:
161+
162+
<img src="./images/10 false.png" alt="10" width="800" >
163+
164+
In the True section set the variable "StatusCode" following the example:
165+
166+
<img src="./images/10 true.png" alt="10" width="800" >
167+
168+
Finally we can paste the output to Copilot Agent:
169+
170+
<img src="./images/11 end.png" alt="11" width="800" >
171+
172+
As a final step, save and publish the flow. The entire logic flow must appear like that:
173+
174+
<img src="./images/flow3.png" alt="flow" width="600" >
175+
176+
Go back to continue [Configuration Link](../../README.md#flow3)
177+
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources
2+
| where name =~ "@{triggerBody()?['text']}"
Loading

0 commit comments

Comments
 (0)