# Access workflows by name, not by UID

**URL:** <https://community.weweb.io/t/access-workflows-by-name-not-by-uid/2632>\
**Category:** Ask us anything\
**Created:** [May 8, 2023, 11:40pm UTC](https://community.weweb.io/t/access-workflows-by-name-not-by-uid/2632 "2023-05-08T23:40:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![justifi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/justifi/32/2846_2.png) [@justifi](https://community.weweb.io/u/justifi)\
**Post date:** [May 8, 2023, 11:40pm UTC](https://community.weweb.io/t/access-workflows-by-name-not-by-uid/2632/1 "2023-05-08T23:40:34Z")

</div>

I recently found out that I can access variables and formulas by name - and not UID - in javascript, and it’s made writing code in WeWeb 100x better, i.e.

`formulas.my_custom_function()` instead of `formulas['63ce94ae-b7a9-40a9-af61-ca1fc38fd871']()`

and

`variables.my_var` instead of `variables['c8cdbd31-ab91-4780-9dc1-11b55df1a9a2']`

I know that workflows can be executed using `wwLib.executeWorfklow(workflow_id, args)`.

_ **Is it possible to execute workflows via their name?** _

Either directly, as in  
`wwLib.executeWorfklowByName(workflow_name, args)`

or indirectly, with a helper function/formula `lookupWorkflowIdByName(workflow_name)`, and pass that to `executeWorkflow)`

In the case of the latter, where does the list of workflows and their definitions live?

---

<div class="post-metadata">

**Author:** ![aurelie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/aurelie/32/13249_2.png) [@aurelie](https://community.weweb.io/u/aurelie)\
**Post date:** [May 9, 2023, 7:42am UTC](https://community.weweb.io/t/access-workflows-by-name-not-by-uid/2632/2 "2023-05-09T07:42:03Z")

</div>

Hey,  
that’s not possible at the moment, i will push it to our product team.

Using name is indeed here for a better dev experience, but please be aware that if you change the name/label of a variable, your workflow will be broken.

---

<div class="post-metadata">

**Author:** ![justifi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/justifi/32/2846_2.png) [@justifi](https://community.weweb.io/u/justifi)\
**Post date:** [May 9, 2023, 1:33pm UTC](https://community.weweb.io/t/access-workflows-by-name-not-by-uid/2632/3 "2023-05-09T13:33:41Z")

</div>

Understood. Thank you for clarifying

---

<div class="post-metadata">

**Author:** ![raae](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@raae](https://community.weweb.io/u/raae)\
**Post date:** [July 24, 2023, 4:17pm UTC](https://community.weweb.io/t/access-workflows-by-name-not-by-uid/2632/4 "2023-07-24T16:17:13Z")

</div>

How’s triggering workflows from js coming along?

---

<div class="post-metadata">

**Author:** ![raydeck](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raydeck/32/384_2.png) [@raydeck](https://community.weweb.io/u/raydeck)\
**Post date:** [July 24, 2023, 5:33pm UTC](https://community.weweb.io/t/access-workflows-by-name-not-by-uid/2632/5 "2023-07-24T17:33:51Z")

</div>

You can! I made a video about it a short while ago. [Weweb and executeWorkflow - Connect Any Library - YouTube](https://youtu.be/XFqtSvZmx6c)

(They still require being referenced by the ID)
