# Error: Workflow not found (wwLib.executeWorkflow)

**URL:** <https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702>\
**Category:** How do I?\
**Created:** [May 16, 2023, 6:12pm UTC](https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702 "2023-05-16T18:12:10Z")\
**Posts on this page:** 6\
**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 16, 2023, 6:12pm UTC](https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702/1 "2023-05-16T18:12:10Z")

</div>

Hi. I am using a Custom Javascript action in a workflow to execute another workflow using `wwLib.executeWorkflow()`

It is fully functional in the editor.

In staging/production, `Error: Workflow not found` prints to the console.

I know I’m calling a ‘real’ workflow - it’s not that I’m passing an invalid workflow ID nor an empty string in place of the ID. Prior to executing the workflow, I print two lines to the console that include the workflow ID and relevant details. See screengrab

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/47134d9cb2101d384f50f603d218fc2b19b608fe.png)

The below workflow runs when a button is clicked:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f51f1405066a9ab6726af8060bba7f1f2dcc2595.png)

All of the possible workflows getting called by `wwLib.executeWorkflow` take the same args (my team can assign actions to buttons via our CMS).

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/4fcaa66efe012299b1a6a2b8202ca9b7b85c2250.png)

Note that the workflow does, in fact, exist:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/6371dd816d710ea3b5e69bbd999b0cde6f4e548e.png)

---

<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 17, 2023, 8:53am UTC](https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702/2 "2023-05-17T08:53:23Z")

</div>

Hi,  
this is due to a bug on our side. We are not detecting that you use this workflow, and he is not including in the page.  
To fix this before we do it on our side, you can just copy/paste in a comment the id of your workflow on any js formula on your page, or anywhere on an element

---

<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 17, 2023, 1:18pm UTC](https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702/3 "2023-05-17T13:18:26Z")

</div>

Yes, i figured this out last night - workflows aren’t actually ‘global’.

They’re accessible on a page-by-page basis, determined at build-time, according to their presence and usage.

I think for wwLib.executeWorkflow to actually be useful, each Workflow needs a `is_universal` toggle

of course, i’m not aware of the impact this would have on performance and/or build-time

I’ve implemented your workaround for now.

Thanks @aurelie

---

<div class="post-metadata">

**Author:** ![AmbroiseDhenain](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ambroisedhenain/32/2609_2.png) [@AmbroiseDhenain](https://community.weweb.io/u/AmbroiseDhenain)\
**Post date:** [January 25, 2024, 1:19pm UTC](https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702/4 "2024-01-25T13:19:25Z")

</div>

I also have the same need - to make some workflows available globally, so I can trigger them from any page.

---

<div class="post-metadata">

**Author:** ![mahdi](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mahdi](https://community.weweb.io/u/mahdi)\
**Post date:** [June 11, 2024, 4:49pm UTC](https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702/5 "2024-06-11T16:49:40Z")

</div>

Hi, I am having the same exact issue, how did you work around it to have the custom script able to locate and execute the global workflow? Thanks is advance!

---

<div class="post-metadata">

**Author:** ![wweb101](https://avatars.discourse-cdn.com/v4/letter/w/9fc348/32.png) [@wweb101](https://community.weweb.io/u/wweb101)\
**Post date:** [November 2, 2025, 1:48am UTC](https://community.weweb.io/t/error-workflow-not-found-wwlib-executeworkflow/2702/6 "2025-11-02T01:48:53Z")

</div>

Adding a deactivated step to execute the global workflow from within one of my already existing button workflows acted as a fix for me.
