# Using Homey script output in a flow

**URL:** <https://community.homey.app/t/using-homey-script-output-in-a-flow/69864>\
**Category:** Developers\
**Created:** [October 4, 2022, 12:35pm UTC](https://community.homey.app/t/using-homey-script-output-in-a-flow/69864 "2022-10-04T12:35:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![B3rt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/b3rt/32/9435_2.png) [@B3rt](https://community.homey.app/u/B3rt)\
**Post date:** [October 4, 2022, 12:35pm UTC](https://community.homey.app/t/using-homey-script-output-in-a-flow/69864/1 "2022-10-04T12:35:05Z")

</div>

When i run the following code via the webapi: Homey.logic.getVariables();  
I get a json back with all data i want to use in Homey.

How can i dump this data in a text card so i can write it into a log?

I installed Homey script and run that command but i get errors and i cannot get it into a text card to use in my flows.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [October 4, 2022, 1:37pm UTC](https://community.homey.app/t/using-homey-script-output-in-a-flow/69864/2 "2022-10-04T13:37:40Z")

</div>

Well basicly:

```auto
return JSON.stringify(await Homey.logic.getVariables());

```

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/2/72f9fe02a3910e895cfccdf44d3154240abd13e8.png)

```auto
[TEF:FLOWS:H4sIAAAAAAACA21QwWqEMBD9lWVOu2BEE9doemsplB5aqNBL6WHMjm7AVYmRroj/3phee5gZeO8xM++t4ECtoIdbjO7quy9aJm3NGIgeFLzsUPUHbVsECOprBeMZUSZIMuGsSKVmWZ4XrE6bnAl5FpgQFxILiMKS5zvexo4Oj8I6DxEoZ2eKQO9XBC/LIhU5kzI7s0zIjNWSlwypyXgjeSJS2nV3UHkSwQKq8GPwa8O7CsdR/W8hCn/auX8aLvRBbrb9VDlr+tZT3iGgdmboIbjac7jQrg/Cw2v1/hZPQW2a5Yg/aNwhpBF3Q2t03JL7RGuw7mg6nk4PPp5t+95+AX1E1zdVAQAA]

```

The Text-Tag from this card can be written how you would like.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 4, 2022, 4:29pm UTC](https://community.homey.app/t/using-homey-script-output-in-a-flow/69864/3 "2022-10-04T16:29:35Z")

</div>

Here’s also a nice script.

> [@Delay in variable?](https://community.homey.app/t/delay-in-variable/69724/19):
>
> I have a super HomeyScript for that: // FindLogicsVarsInFlowsTEST.js // // Script to find Homey Logics Variables in Flows, and orphaned Variables (by RonnyW) // Adjusted somewhat, when called from a flow, it returns the output in a Variable (PD) // // Enable all "log" entries to output results to console //log("============================================================="); //log("Flow Search for Logics Variables"); //log("============================================================="); //log…

---

<div class="post-metadata">

**Author:** ![B3rt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/b3rt/32/9435_2.png) [@B3rt](https://community.homey.app/u/B3rt)\
**Post date:** [October 4, 2022, 9:09pm UTC](https://community.homey.app/t/using-homey-script-output-in-a-flow/69864/4 "2022-10-04T21:09:26Z")

</div>

Thx.

The script idea works, maybe someone can implement it in a logging (or other) app 🙂 so it can be used by everyone very easily using just flow cards…
