# Nice to know? Workflow task returns true or false

**URL:** <https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835>\
**Category:** Developer Q&A Forum\
**Tags:** workflows\
**Created:** [May 27, 2025, 8:47am UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835 "2025-05-27T08:47:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [May 27, 2025, 8:47am UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/1 "2025-05-27T08:47:34Z")

</div>

Hello,

When a workflow task returns Boolean true (or false),

{  
“result”: true  
}

to run the next task if to you need to use:

 ![henk_stobbe_0-1748335407136.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/5/15ba474615d25e03fd07f011392bbb024871cf35.png)

Who can confirm (-;

KR Henk

---

<div class="post-metadata">

**Author:** ![haris](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/haris/32/38293_2.png) [@haris](https://community.dynatrace.com/u/haris)\
**Post date:** [May 27, 2025, 11:13am UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/2 "2025-05-27T11:13:35Z")

</div>

Hi Henk,

That would work, but we always recommend square brackets: {{result(“run\_javascript\_1”)[“result”] == false}}

Best, Haris

Edit:

It should be `True` or `False` (in capital letters), as these are valid names for Python booleans.

One could also use a “short form”, that is:

```auto
{{ result("run_javascript_1")["result"] }}

```

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [May 27, 2025, 11:28am UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/3 "2025-05-27T11:28:00Z")

</div>

Hi Haris,

Thanks for the comment!

KR Henk

---

<div class="post-metadata">

**Author:** ![michal\_zawislak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michal_zawislak/32/13613_2.png) [@michal\_zawislak](https://community.dynatrace.com/u/michal_zawislak)\
**Post date:** [May 27, 2025, 12:29pm UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/4 "2025-05-27T12:29:34Z")

</div>

It should be `True` or `False` (in capital letters), as these are valid names for Python booleans.

Sorry for nitpicking 🙈

One could also use a “short form”, that is:

```auto
{{ result("run_javascript_1")["result"] }}

```

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [May 27, 2025, 12:52pm UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/5 "2025-05-27T12:52:55Z")

</div>

Hello Michal,

In this case, the combination of TS and Python needs a little nitpicking (-;

So&nbsp; above will work if the result of the task returns True or False,&nbsp; but JS uses true and false. So you need to convert the return first? Or is this done automatic…

Thanks Henk

---

<div class="post-metadata">

**Author:** ![michal\_zawislak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michal_zawislak/32/13613_2.png) [@michal\_zawislak](https://community.dynatrace.com/u/michal_zawislak)\
**Post date:** [May 27, 2025, 1:05pm UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/6 "2025-05-27T13:05:27Z")

</div>

Hi Henk,

If a boolean value needs to be converted, we do that out of the box, so you don’t need to worry about that.

 ![michal_zawislak_0-1748351089269.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/7/474857b7fd151c22a401b48bcd9d07dba724bb50.png)

Hope this clarifies things a bit 🙂

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [September 5, 2025, 2:31pm UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/7 "2025-09-05T14:31:38Z")

</div>

I see this thread is the most suitable thread for my question and I appreciate if some help in this frustrating workflow.

I have a workflow which I designed to wrap another Dynatrace API to give to another team. The workflow works fine but I am struggling to return only the final results json of the last task in the workflow and I use the following (see also the screen shot)

{{ result(“create\_token”) }}

I add the above in the in the last box of the workflow option (see screenshot)

When I run the workflow from outside using the url of the workflow using the platform API from outside I never get the results of the last task in my workflow instead I only get the output of the workflow content like this,

Any idea what I need to do extra please?

Raw Response Content (bytes): b’{“id”:“e2b4522c-8993-4788-88eb-a40bbc697d8f”,“workflow”:“58803a59-3707-4cf0-a080-3d48c9c80194”,“state”:“RUNNING”,“stateInfo”:null,“input”:{“name”:“cloud\_team\_remove”,“days”:“30”},“providedInput”:{“name”:“cloud\_team\_remove”,“days”:“30”},“params”:{},“startedAt”:“2025-09-05T14:14:51.535710Z”,“endedAt”:null,“runtime”:0,“trigger”:“[myname@x.com](mailto:myname@x.com)”,“schedule”:null,“eventTrigger”:null,“user”:“d5ab893c-edde-4351-b63c-7719f537bda9”,“actor”:“d5ab893c-edde-4351-b63c-7719f537bda9”,“title”:“WORKFLOW\_NAME”,“result”:{},“triggerType”:“Manual”,“workflowVersion”:27,“workflowType”:“STANDARD”,“triggerTypeDetail”:{“userId”:“d5ab893c-edde-4351-b63c-7719f537bda9”},“parentExecution”:null,“parentTaskName”:null,“rootExecution”:null,“rootWorkflow”:“58803a59-3707-4cf0-a080-3d48c9c80194”,“isDraft”:false}’

I was expecting to get only the results of the output of my last task exactly in your case where you want true or false or True or False but my case I need the JSON results of the last task as I mentioned

I appreciate your support.

 ![ONE.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/9/9955214421d2b1fa033bbcd787b405257b8c35fe.png)

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [September 5, 2025, 3:14pm UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/8 "2025-09-05T15:14:10Z")

</div>

I have tried even to use the workflow API to fetch the results in another API call but it returns empty, I used this

```auto
Extracted Execution ID: <span>e2b4522c-8993-4788-88eb-a40bbc697d8f</span>

Fetching final result from: <a href="https://{environmentid}.apps.dynatrace.com/platform/automation/v1/workflows/executions/63937a06-8e39-47cd-b6d0-876e86d78dc5" target="_blank" rel="noopener nofollow noreferrer">https://TENANT_ID.dynatrace.com/platform/automation/v1/workflows/executions/<span>e2b4522c-8993-4788-88eb-a40bbc697d8f</span></a>

=== Final Workflow Execution Result ===
{}<br><br>Any more ideas is welcome

```

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [September 6, 2025, 8:50am UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/9 "2025-09-06T08:50:59Z")

</div>

Good Morning Marwan,

I hope I understand the question correctly, otherwise I will remove this answer.

Simply put the workflow runs async.&nbsp; The reply you get says:&nbsp;“state”:“RUNNING”,

So you have to wait until the WF is done.

So best is:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Loop(while running, wait)&nbsp; if done → get the result.

KR Henk

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [September 8, 2025, 10:59am UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/10 "2025-09-08T10:59:03Z")

</div>

Thanks Hank for your reply, there is not a way to wait, as it is a single invokation however, you may fetch the results like you said before in another thread, I am trying this API now

[https://community.dynatrace.com/t5/Automations/How-to-retrieve-workflow-return-value-s-by-API/m-p/248615](https://community.dynatrace.com/post/248615)

---

<div class="post-metadata">

**Author:** ![MarwanC](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marwanc/32/34480_2.png) [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Post date:** [October 10, 2025, 10:10am UTC](https://community.dynatrace.com/t/nice-to-know-workflow-task-returns-true-or-false/51835/11 "2025-10-10T10:10:01Z")

</div>

You may also look at this thread:&nbsp;[https://community.dynatrace.com/t5/Automations/How-to-retrieve-workflow-return-value-s-by-API/m-p/248615](https://community.dynatrace.com/post/248615)
