cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevieC
Helper III
Helper III

Set Sting Var from output body of Get Job Output

Hi

I have flow that uses get Job Output to get the output from a powershell script run in an automation account.  I want to use this output in a variable:


<p>Contact ICT with the details below: </p>
<p><em>@{body('Get_job_output')?['body']}</em></p>

 

But i get this error:

 

InvalidTemplate. Unable to process template language expressions in action 'Set_variable' inputs at line '1' and column '52556': 'The template language expression 'body('Get_job_output')?['body']' cannot be evaluated because property 'body' cannot be selected. Property selection is not supported on values of type 'String'. 

 

Any ideas why this is happening?

 

cheers

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

The clue is in the error, it is tell you that the output of body('Get_job_output') is a string. You are also selecting the same thing twice, You probably want:

body('Get_job_output')
or
outputs('Get_job_output')?['body']

View solution in original post

2 REPLIES 2
Paulie78
Super User
Super User

The clue is in the error, it is tell you that the output of body('Get_job_output') is a string. You are also selecting the same thing twice, You probably want:

body('Get_job_output')
or
outputs('Get_job_output')?['body']

Thanks  - well spotted!  Amazing that i picked that value from the list of dynamic values the UI gave me!! Flow is great, but one of the most glitchy UIs i've ever used!! 🤣

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,505)