# Trigger flow from homeyscript isn't working

**URL:** <https://community.homey.app/t/trigger-flow-from-homeyscript-isnt-working/16700>\
**Category:** Questions & Help\
**Created:** [August 10, 2019, 6:50pm UTC](https://community.homey.app/t/trigger-flow-from-homeyscript-isnt-working/16700 "2019-08-10T18:50:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon-Egil\_Nordvik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jon-egil_nordvik/32/6211_2.png) [@Jon-Egil\_Nordvik](https://community.homey.app/u/Jon-Egil_Nordvik)\
**Post date:** [August 10, 2019, 6:50pm UTC](https://community.homey.app/t/trigger-flow-from-homeyscript-isnt-working/16700/1 "2019-08-10T18:50:53Z")

</div>

Hi  
I’m trying to trigger a flow from homeyscript with this script:  
################################################  
// my script

[//console.log](https://console.log)(lFlows);

Homey.flow.triggerFlow({id: ‘731c8b42-a7db-4fa9-be07-9ca457ed2059’});

return(true)

#####################################################

I do not get any error messages, but nothing happens.  
If I run the same line in Homey developer the flow is triggered and everything works fine.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 10, 2019, 7:06pm UTC](https://community.homey.app/t/trigger-flow-from-homeyscript-isnt-working/16700/2 "2019-08-10T19:06:28Z")

</div>

HomeyScript doesn’t have full permissions, whereas the developer console has (the logic of which escapes me).

If you want to see the error, you need to use `await` so your script will wait for the execution of the method call to finish:

```auto
await Homey.flow.triggerFlow({ id: '731c8b42-a7db-4fa9-be07-9ca457ed2059' });

```

---

<div class="post-metadata">

**Author:** ![Jon-Egil\_Nordvik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jon-egil_nordvik/32/6211_2.png) [@Jon-Egil\_Nordvik](https://community.homey.app/u/Jon-Egil_Nordvik)\
**Post date:** [August 11, 2019, 10:25am UTC](https://community.homey.app/t/trigger-flow-from-homeyscript-isnt-working/16700/3 "2019-08-11T10:25:41Z")

</div>

Thanks, then I’ll go through setting a variable that a flow listens to, instead.
