web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : u2oTbrBarVlJhET9EsL4vN
Power Automate - Building Flows
Answered

process Get Job Output

Like (0) ShareShare
ReportReport
Posted on 9 Feb 2021 16:23:50 by 137

Hi

I have a flow that triggers a PowerShell RunBook in an Automation account.  I have a Get job Output action next which gets something like:

 

Account : 1234566789
Environment : AzureCloud
Tenant : 1234566789
TenantId : 1234566789
TenantDomain : ourtenent.onmicrosoft.com


Account : 12344567
Environment : AzureCloud
Tenant : 12345678
TenantId : 12346780
TenantDomain : ourtenent.onmicrosoft.com

{
"Connection": "Successful"

"CreateTeam": "Successful"

"TeamName": "My Test"

"TeamOwner": "john.doe@ourdomain.co.uk"

"TeamScope": "External",

"UpdateGroupSettings": "Successful"

"AddToExternalAdminUnit": "Failed to add to ExternalO365Groups Admin Unit"
}

 

Id like to extract the JSON formatted bit (between the curly braces) to be able to troubleshoot the output.  How do i do this?

 

cheers 🙂

I have the same question (0)
  • StevieC Profile Picture
    137 on 10 Feb 2021 at 16:25:33
    Re: process Get Job Output

    Perfect - thanks 🙂

  • Verified answer
    tom_riha Profile Picture
    10,155 Most Valuable Professional on 09 Feb 2021 at 16:43:17
    Re: process Get Job Output

    Hello @StevieC ,

    if you can add a comma after each line in the JSON formatted bit (change it in the PowerShell), you can access the elements as an array:

    image.png

    And if you need to extract the JSON part from the full output, I'd do it with the split(...) expression by the '{' character, take only the second part of the split, add back the '{' and convert it to JSON. And then access it as an array.

    json(concat('{',split(outputs('Compose_11'),'{')[1]))

    image.png

    But both solutions require that you can add a comma after each line in the JSON-like part.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 798 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 469 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 333

Last 30 days Overall leaderboard
Loading started
Loading complete