Skip to content

Commit 0ec0d8d

Browse files
mkm17Adam-it
authored andcommitted
Extends m365 flow run get with the ability to retrieve the action information. Closes #1828
1 parent ac45e93 commit 0ec0d8d

File tree

3 files changed

+574
-20
lines changed

3 files changed

+574
-20
lines changed

docs/docs/cmd/flow/run/run-get.mdx

Lines changed: 167 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ m365 flow run get [options]
2525
: The name of the environment where the flow is located
2626

2727
`--includeTriggerInformation`
28+
: (deprecated. Use option `withTrigger` instead) If specified, include information about the trigger details
29+
30+
`--withTrigger`
2831
: If specified, include information about the trigger details
32+
33+
`--withActions [withActions]`
34+
: If specified, include information about all actions when no action names are specified, or provide a specified list of actions separated by commas to include only the relevant action details
35+
2936
```
3037

3138
<Global />
@@ -44,7 +51,7 @@ If the Microsoft Flow with the name you specified doesn't exist, you will get th
4451

4552
If the run with the name you specified doesn't exist, you will get the `The provided workflow run name is not valid.` error.
4653

47-
If the option `includeTriggerInformation` is specified, but the trigger does not contain an outputsLink such as for example with a `Recurrence` trigger, this option will be ignored.
54+
If the option `withTrigger` is specified, but the trigger does not contain an outputsLink such as for example with a `Recurrence` trigger, this option will be ignored.
4855

4956
## Examples
5057

@@ -57,7 +64,19 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
5764
Get information about the given run of the specified Power Automate flow including trigger information
5865

5966
```sh
60-
m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --includeTriggerInformation
67+
m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withTrigger
68+
```
69+
70+
Get information about the given run of the specified Power Automate flow including details about all associated actions.
71+
72+
```sh
73+
m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withActions
74+
```
75+
76+
Get information about the given run of the specified Power Automate flow including exclusively the details of 'Action_Internal_Name1' and 'Action_Internal_Name2' actions
77+
78+
```sh
79+
m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withActions "Action_Internal_Name1,Action_Internal_Name2"
6180
```
6281

6382
## Response
@@ -157,9 +176,9 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
157176
</TabItem>
158177
</Tabs>
159178

160-
### `includeTriggerInformation` response
179+
### `withTrigger` response
161180

162-
When using the option `includeTriggerInformation`, the response for the json-output will differ.
181+
When using the option `withTrigger`, the response for the json-output will differ.
163182

164183
<Tabs>
165184
<TabItem value="JSON">
@@ -233,3 +252,147 @@ When using the option `includeTriggerInformation`, the response for the json-out
233252
</TabItem>
234253
</Tabs>
235254

255+
### `withActions` response
256+
257+
When using the option `withActions`, the response for the json-output will differ.
258+
259+
<Tabs>
260+
<TabItem value="JSON">
261+
262+
```json
263+
{
264+
"name": "08585236861638480597867166179CU104",
265+
"id": "/providers/Microsoft.ProcessSimple/environments/Default-e1dd4023-a656-480a-8a0e-c1b1eec51e1d/flows/24335774-daf6-4183-acb7-f5155c2cd2fe/runs/08585236861638480597867166179CU104",
266+
"type": "Microsoft.ProcessSimple/environments/flows/runs",
267+
"properties": {
268+
"actions":{
269+
"Compose": {
270+
"input": "Test",
271+
"inputsLink": {
272+
"uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionInputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=wYD6bMHjdoOawYAMTHqpmyILowLKRCkFEfsNxi1NFzw",
273+
"contentVersion": "test==",
274+
"contentSize": 6,
275+
"contentHash": {
276+
"algorithm": "md5",
277+
"value": "test=="
278+
}
279+
},
280+
"output": "Test",
281+
"outputsLink": {
282+
"uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionOutputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=KoI4_RAEVNFUgymktOFxvfb5mCoIKR2WCYGwexjD7kY",
283+
"contentVersion": "test==",
284+
"contentSize": 6,
285+
"contentHash": {
286+
"algorithm": "md5",
287+
"value": "test=="
288+
}
289+
},
290+
"startTime": "2023-11-17T21:06:14.466889Z",
291+
"endTime": "2023-11-17T21:06:14.4676104Z",
292+
"correlation": {
293+
"actionTrackingId": "dabed750-0ec4-4c34-98f5-cc3695e0811e",
294+
"clientTrackingId": "08585013686846794051719443325CU251",
295+
"clientKeywords": [
296+
"resubmitFlow"
297+
]
298+
},
299+
"status": "Succeeded",
300+
"code": "OK"
301+
}
302+
},
303+
"startTime": "2023-03-04T09:05:21.8066368Z",
304+
"endTime": "2023-03-04T09:05:22.5880202Z",
305+
"status": "Succeeded",
306+
"correlation": {
307+
"clientTrackingId": "08585236861638480598867166179CU131"
308+
},
309+
"trigger": {
310+
"name": "When_an_email_is_flagged_(V4)",
311+
"inputsLink": {
312+
"uri": "https://prod-130.westeurope.logic.azure.com:443/workflows/3ebadb794f6641e0b7f4fda131cdfb0b/runs/08585236861638480597867166179CU104/contents/TriggerInputs?api-version=2016-06-01&se=2023-03-04T14%3A00%3A00.0000000Z&sp=%2Fruns%2F08585236861638480597867166179CU104%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=",
313+
"contentVersion": "2v/VLXFrKV6JvwSdcN7aHg==",
314+
"contentSize": 343,
315+
"contentHash": {
316+
"algorithm": "md5",
317+
"value": "2v/VLXFrKV6JvwSdcN7aHg=="
318+
}
319+
},
320+
"outputsLink": {
321+
"uri": "https://prod-130.westeurope.logic.azure.com:443/workflows/3ebadb794f6641e0b7f4fda131cdfb0b/runs/08585236861638480597867166179CU104/contents/TriggerOutputs?api-version=2016-06-01&se=2023-03-04T14%3A00%3A00.0000000Z&sp=%2Fruns%2F08585236861638480597867166179CU104%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=",
322+
"contentVersion": "AHZEeWNlQ0bLe48yDmpzrQ==",
323+
"contentSize": 3478,
324+
"contentHash": {
325+
"algorithm": "md5",
326+
"value": "AHZEeWNlQ0bLe48yDmpzrQ=="
327+
}
328+
},
329+
"startTime": "2023-03-04T09:05:21.6192576Z",
330+
"endTime": "2023-03-04T09:05:21.7442626Z",
331+
"scheduledTime": "2023-03-04T09:05:21.573561Z",
332+
"originHistoryName": "08585236861638480598867166179CU131",
333+
"correlation": {
334+
"clientTrackingId": "08585236861638480598867166179CU131"
335+
},
336+
"code": "OK",
337+
"status": "Succeeded"
338+
}
339+
},
340+
"startTime": "2023-03-04T09:05:21.8066368Z",
341+
"endTime": "2023-03-04T09:05:22.5880202Z",
342+
"status": "Succeeded",
343+
"triggerName": "When_an_email_is_flagged_(V4)",
344+
"triggerInformation": {
345+
"from": "john@contoso.com",
346+
"toRecipients": "doe@contoso.com",
347+
"subject": "Dummy email",
348+
"body": "<html><head>\r\\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body><p>This is dummy content</p></body></html>",
349+
"importance": "normal",
350+
"bodyPreview": "This is dummy content",
351+
"hasAttachments": false,
352+
"id": "AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALUqy81AAA=",
353+
"internetMessageId": "<DB7PR03MB5018879914324FC65695809FE1AD9@DB7PR03MB5018.eurprd03.prod.outlook.com>",
354+
"conversationId": "AAQkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgAQAMqP9zsK8a1CnIYEgHclLTk=",
355+
"receivedDateTime": "2023-03-01T15:06:57+00:00",
356+
"isRead": false,
357+
"attachments": [],
358+
"isHtml": true
359+
},
360+
"actions": {
361+
"Compose": {
362+
"input": "Test",
363+
"inputsLink": {
364+
"uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionInputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=wYD6bMHjdoOawYAMTHqpmyILowLKRCkFEfsNxi1NFzw",
365+
"contentVersion": "test==",
366+
"contentSize": 6,
367+
"contentHash": {
368+
"algorithm": "md5",
369+
"value": "test=="
370+
}
371+
},
372+
"output": "Test",
373+
"outputsLink": {
374+
"uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionOutputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=KoI4_RAEVNFUgymktOFxvfb5mCoIKR2WCYGwexjD7kY",
375+
"contentVersion": "test==",
376+
"contentSize": 6,
377+
"contentHash": {
378+
"algorithm": "md5",
379+
"value": "test=="
380+
}
381+
},
382+
"startTime": "2023-11-17T21:06:14.466889Z",
383+
"endTime": "2023-11-17T21:06:14.4676104Z",
384+
"correlation": {
385+
"actionTrackingId": "dabed750-0ec4-4c34-98f5-cc3695e0811e",
386+
"clientTrackingId": "08585013686846794051719443325CU251",
387+
"clientKeywords": [
388+
"resubmitFlow"
389+
]
390+
},
391+
"status": "Succeeded",
392+
"code": "OK"
393+
}
394+
}
395+
}
396+
```
397+
</TabItem>
398+
</Tabs>

0 commit comments

Comments
 (0)