# Homeyscript - enhancements to the api for advanced flows

**URL:** <https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [July 6, 2022, 9:24am UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600 "2022-07-06T09:24:13Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [July 6, 2022, 9:24am UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/1 "2022-07-06T09:24:13Z")

</div>

Hi, I don’t get any AF flows with the standard function:

const flows = await Homey.flow.getFlows();

Can someone confirm this, please?

Maybe the api has changed a little bit with AF.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [July 6, 2022, 9:29am UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/2 "2022-07-06T09:29:14Z")

</div>

Correct,

> [@Export flows to CSV](https://community.homey.app/t/export-flows-to-csv/65336/7):
>
> Go to [https://tools.developer.homey.app/tools/api-playground](https://tools.developer.homey.app/tools/api-playground) Homey.flow.getFlows(); // or Homey.flow.getAdvancedFlows(); Run Use Inspect (in Chrome Ctrl-Shft-I) Look for Network - Flow Copy Response That is a nearly Perfect JSON, check that in fe My Favorit online JSON Tool [https://jsonformatter.curiousconcept.com/#](https://jsonformatter.curiousconcept.com/#) Pls let me know how you converted this multi-value, multi dimensional complex object to a CSV format.

> **[ManagerFlow - Homey Web API](https://athombv.github.io/node-homey-api/HomeyAPIV2.ManagerFlow.html#getAdvancedFlow)**

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [July 6, 2022, 9:31am UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/3 "2022-07-06T09:31:33Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [July 6, 2022, 5:31pm UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/4 "2022-07-06T17:31:41Z")

</div>

Hi @Dijker, one more question, please:

Homey.flow.getAdvancedFlows() and extracting the flow ids work now.  
But I got the following error with triggering an advanced flow.  
Any idea what could cause the problem?

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

Same here:

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

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

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [July 6, 2022, 6:32pm UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/5 "2022-07-06T18:32:08Z")

</div>

Just published a new version that fixed this [HomeyScript App voor Homey | Homey](https://homey.app/nl-nl/app/com.athom.homeyscript/HomeyScript/)

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [July 6, 2022, 6:57pm UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/6 "2022-07-06T18:57:30Z")

</div>

THX!

Please could you tell us how it is possible to call a flow with a variable in homeyscript. Like the new flow cards.

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [July 6, 2022, 7:05pm UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/7 "2022-07-06T19:05:19Z")

</div>

```auto
const result = await Homey.flow.runFlowCardAction({
  uri: 'homey:manager:flow',
  id: 'programmatic_trigger_string_tag',
  args: {
    flow: {
      type: 'advanced',
      id: '6f28af21-2b4e-40f8-91e6-e56681c31a7d'
    },
    string: 'myvalue'
  }
});

console.log(result);

```

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [July 6, 2022, 7:07pm UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/8 "2022-07-06T19:07:59Z")

</div>

Thanks Jero!

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [July 7, 2022, 9:06am UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/9 "2022-07-07T09:06:35Z")

</div>

Hi Jero, I have got a nice change request:

Please make the edit window of inline scripts resizeable. At the moment it feels like editing in a porthole 😉

THX

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [July 7, 2022, 9:12am UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/10 "2022-07-07T09:12:37Z")

</div>

I agree just need to convince someone else 😉

---

<div class="post-metadata">

**Author:** ![Joka](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Joka](https://community.homey.app/u/Joka)\
**Post date:** [July 7, 2022, 12:06pm UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/11 "2022-07-07T12:06:46Z")

</div>

Works like charm 🙂

How can I find out the properties of the flow object in the args in general by myself?

I mean getFlowCardActions shows the flow property itself and that I need the target flow id is clear. But how had I been able to find out the type property?

> [@Jero](#):
>
> ```auto
> args: {
> flow: {
> type: 'advanced',
> id: '6f28af21-2b4e-40f8-91e6-e56681c31a7d'
> },
> 
> ```

THX for your time!

---

<div class="post-metadata">

**Author:** ![Jero](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jero/32/17556_2.png) [@Jero](https://community.homey.app/u/Jero)\
**Post date:** [July 7, 2022, 12:12pm UTC](https://community.homey.app/t/homeyscript-enhancements-to-the-api-for-advanced-flows/65600/12 "2022-07-07T12:12:40Z")

</div>

Only way to find that one out is to actualy create a Flow that has the card filled in and check the JSON of that Flow to see what it looks like/accepts.
