# What is the command to get "python script" output using template Node

**URL:** <https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144>\
**Category:** General\
**Created:** [24 May 2021 10:02 UTC](https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144 "2021-05-24T10:02:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinaykumar.v](https://avatars.discourse-cdn.com/v4/letter/v/958977/32.png) [@vinaykumar.v](https://discourse.nodered.org/u/vinaykumar.v)\
**Post date:** [24 May 2021 10:02 UTC](https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144/1 "2021-05-24T10:02:07Z")

</div>

Hi I am vinay,

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/3/f376eeb3921eda768e9a1fa110ab0a8138fefb72.png)

Here I have written "hello world" program in python file and I have placed python file path in "exec node". From that node I want to fetch python script output into "template" node.

I have used {{msg.payload}} but it is not getting

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [24 May 2021 10:09 UTC](https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144/2 "2021-05-24T10:09:55Z")

</div>

Just {{payload}} should work!

---

<div class="post-metadata">

**Author:** ![vinaykumar.v](https://avatars.discourse-cdn.com/v4/letter/v/958977/32.png) [@vinaykumar.v](https://discourse.nodered.org/u/vinaykumar.v)\
**Post date:** [24 May 2021 10:23 UTC](https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144/3 "2021-05-24T10:23:54Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/f/8f1f5363c7da133c2199fea8e79eb1aebf874b34.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/5/a597865dc71213e7377d0eff86c75e0a3cc9d1c9.png)

I have used console.log({{payload}}) to see output in chrome "console"  
It is getting above error

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [24 May 2021 10:51 UTC](https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144/4 "2021-05-24T10:51:35Z")

</div>

Looks like you are missing a closing bracket there!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [24 May 2021 11:40 UTC](https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144/5 "2021-05-24T11:40:15Z")

</div>

missing quotes around the text (the bracket is there on the next line)

should be `console.log("hello world")`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 June 2021 11:40 UTC](https://discourse.nodered.org/t/what-is-the-command-to-get-python-script-output-using-template-node/46144/6 "2021-06-23T11:40:35Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
