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 :
Power Platform Community / Forums / Power Automate / Set Sting Var from out...
Power Automate
Unanswered

Set Sting Var from output body of Get Job Output

(0) ShareShare
ReportReport
Posted on by 137

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

Categories:
I have the same question (0)
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at
    Re: Set Sting Var from output body of Get Job Output

    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']
  • StevieC Profile Picture
    137 on at
    Re: Set Sting Var from output body of Get Job Output

    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!! 🤣

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard