Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

process Get Job Output

(0) ShareShare
ReportReport
Posted on 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 🙂

  • StevieC Profile Picture
    137 on at
    Re: process Get Job Output

    Perfect - thanks 🙂

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1