# Sub-Workflow doesn't work

**URL:** <https://community.mindstudio.ai/t/sub-workflow-doesnt-work/1126>\
**Category:** Community Discussion\
**Created:** [June 16, 2025, 8:59am UTC](https://community.mindstudio.ai/t/sub-workflow-doesnt-work/1126 "2025-06-16T08:59:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KimSa](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@KimSa](https://community.mindstudio.ai/u/KimSa)\
**Post date:** [June 16, 2025, 8:59am UTC](https://community.mindstudio.ai/t/sub-workflow-doesnt-work/1126/1 "2025-06-16T08:59:55Z")

</div>

I follow the “Running Sub-Workflows to Iterate and Process Data with AI” and at time 3’24, I get an error message shown on the picture about the launch variable configuration.

Can someone show me how to fix it?

 ![Screenshot 2025-06-16 at 15.54.42](https://canada1.discourse-cdn.com/flex008/uploads/mindstudio/original/1X/6d007689a50269831a6757347884e4ac604b8524.jpeg)

The lecture: [https://www.youtube.com/watch?v=6GubegBVSXA&t=186s](https://www.youtube.com/watch?v=6GubegBVSXA&t=186s)

---

<div class="post-metadata">

**Author:** ![Alex\_MindStudio](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/alex_mindstudio/32/27_2.png) [@Alex\_MindStudio](https://community.mindstudio.ai/u/Alex_MindStudio)\
**Post date:** [June 16, 2025, 12:00pm UTC](https://community.mindstudio.ai/t/sub-workflow-doesnt-work/1126/2 "2025-06-16T12:00:16Z")

</div>

Hi @KimSa,

Thanks for the screenshot!

It looks like the Launch Variables haven’t been defined in your sub-workflow, which is why the Run Workflow block isn’t accepting the configuration.

I recommend remixing the sample Agents that use the Run Workflow block to see how it’s set up:  
[https://community.mindstudio.ai/t/troubleshooting-guide-101/71#p-104-run-workflow-block-error-7](https://community.mindstudio.ai/t/troubleshooting-guide-101/71#p-104-run-workflow-block-error-7)

Here are the key steps:

1. Add another workflow to your Agent
2. Define Launch Variables in the Start block of the sub-workflow (data you’ll pass to the sub-workflow)
3. Add a key-value pair in the End block (data that will be returned to the main workflow)
4. Configure the Run Workflow block in the main workflow

These steps are also shown in the video you shared at 2:15:

[![](https://canada1.discourse-cdn.com/flex008/uploads/mindstudio/original/1X/5d41338f102fdd5c17139398f0b0ba3a45c9fd02.jpeg "Running Sub-Workflows to Iterate and Process Data With AI") ](https://www.youtube.com/watch?v=6GubegBVSXA&t=135)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![KimSa](https://avatars.discourse-cdn.com/v4/letter/k/bcef8e/32.png) [@KimSa](https://community.mindstudio.ai/u/KimSa)\
**Post date:** [June 18, 2025, 3:31am UTC](https://community.mindstudio.ai/t/sub-workflow-doesnt-work/1126/3 "2025-06-18T03:31:43Z")

</div>

Thank you. I get it.
