Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhances m365 flow run get with the ability to retrieve the action details. Closes #1828 #5723

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 167 additions & 4 deletions docs/docs/cmd/flow/run/run-get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ m365 flow run get [options]
: The name of the environment where the flow is located

`--includeTriggerInformation`
: (deprecated. Use option `withTrigger` instead) If specified, include information about the trigger details

`--withTrigger`
: If specified, include information about the trigger details

`--withActions [withActions]`
: 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

```

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

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

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.
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.

## Examples

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

```sh
m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --includeTriggerInformation
m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withTrigger
```

Get information about the given run of the specified Power Automate flow including details about all associated actions.

```sh
m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withActions
```

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

```sh
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"
```

## Response
Expand Down Expand Up @@ -157,9 +176,9 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
</TabItem>
</Tabs>

### `includeTriggerInformation` response
### `withTrigger` response

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

<Tabs>
<TabItem value="JSON">
Expand Down Expand Up @@ -233,3 +252,147 @@ When using the option `includeTriggerInformation`, the response for the json-out
</TabItem>
</Tabs>

### `withActions` response

When using the option `withActions`, the response for the json-output will differ.

<Tabs>
<TabItem value="JSON">

```json
{
"name": "08585236861638480597867166179CU104",
"id": "/providers/Microsoft.ProcessSimple/environments/Default-e1dd4023-a656-480a-8a0e-c1b1eec51e1d/flows/24335774-daf6-4183-acb7-f5155c2cd2fe/runs/08585236861638480597867166179CU104",
"type": "Microsoft.ProcessSimple/environments/flows/runs",
"properties": {
"actions":{
mkm17 marked this conversation as resolved.
Show resolved Hide resolved
"Compose": {
"input": "Test",
"inputsLink": {
"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",
"contentVersion": "test==",
"contentSize": 6,
"contentHash": {
"algorithm": "md5",
"value": "test=="
}
},
"output": "Test",
"outputsLink": {
"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",
"contentVersion": "test==",
"contentSize": 6,
"contentHash": {
"algorithm": "md5",
"value": "test=="
}
},
"startTime": "2023-11-17T21:06:14.466889Z",
"endTime": "2023-11-17T21:06:14.4676104Z",
"correlation": {
"actionTrackingId": "dabed750-0ec4-4c34-98f5-cc3695e0811e",
"clientTrackingId": "08585013686846794051719443325CU251",
"clientKeywords": [
"resubmitFlow"
]
},
"status": "Succeeded",
"code": "OK"
}
},
"startTime": "2023-03-04T09:05:21.8066368Z",
"endTime": "2023-03-04T09:05:22.5880202Z",
"status": "Succeeded",
"correlation": {
"clientTrackingId": "08585236861638480598867166179CU131"
},
"trigger": {
"name": "When_an_email_is_flagged_(V4)",
"inputsLink": {
"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=",
"contentVersion": "2v/VLXFrKV6JvwSdcN7aHg==",
"contentSize": 343,
"contentHash": {
"algorithm": "md5",
"value": "2v/VLXFrKV6JvwSdcN7aHg=="
}
},
"outputsLink": {
"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=",
"contentVersion": "AHZEeWNlQ0bLe48yDmpzrQ==",
"contentSize": 3478,
"contentHash": {
"algorithm": "md5",
"value": "AHZEeWNlQ0bLe48yDmpzrQ=="
}
},
"startTime": "2023-03-04T09:05:21.6192576Z",
"endTime": "2023-03-04T09:05:21.7442626Z",
"scheduledTime": "2023-03-04T09:05:21.573561Z",
"originHistoryName": "08585236861638480598867166179CU131",
"correlation": {
"clientTrackingId": "08585236861638480598867166179CU131"
},
"code": "OK",
"status": "Succeeded"
}
},
"startTime": "2023-03-04T09:05:21.8066368Z",
"endTime": "2023-03-04T09:05:22.5880202Z",
"status": "Succeeded",
"triggerName": "When_an_email_is_flagged_(V4)",
"triggerInformation": {
"from": "[email protected]",
"toRecipients": "[email protected]",
"subject": "Dummy email",
"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>",
"importance": "normal",
"bodyPreview": "This is dummy content",
"hasAttachments": false,
"id": "AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALUqy81AAA=",
"internetMessageId": "<DB7PR03MB5018879914324FC65695809FE1AD9@DB7PR03MB5018.eurprd03.prod.outlook.com>",
"conversationId": "AAQkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgAQAMqP9zsK8a1CnIYEgHclLTk=",
"receivedDateTime": "2023-03-01T15:06:57+00:00",
"isRead": false,
"attachments": [],
"isHtml": true
},
"actions": {
"Compose": {
"input": "Test",
"inputsLink": {
"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",
"contentVersion": "test==",
"contentSize": 6,
"contentHash": {
"algorithm": "md5",
"value": "test=="
}
},
"output": "Test",
"outputsLink": {
"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",
"contentVersion": "test==",
"contentSize": 6,
"contentHash": {
"algorithm": "md5",
"value": "test=="
}
},
"startTime": "2023-11-17T21:06:14.466889Z",
"endTime": "2023-11-17T21:06:14.4676104Z",
"correlation": {
"actionTrackingId": "dabed750-0ec4-4c34-98f5-cc3695e0811e",
"clientTrackingId": "08585013686846794051719443325CU251",
"clientKeywords": [
"resubmitFlow"
]
},
"status": "Succeeded",
"code": "OK"
}
}
}
```
</TabItem>
</Tabs>
Loading