# Error Running Davis® for workflows.

**URL:** <https://community.dynatrace.com/t/error-running-davis-for-workflows/40663>\
**Category:** Automations\
**Tags:** davis, workflows\
**Created:** [July 12, 2023, 3:32pm UTC](https://community.dynatrace.com/t/error-running-davis-for-workflows/40663 "2023-07-12T15:32:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![echwallah](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@echwallah](https://community.dynatrace.com/u/echwallah)\
**Post date:** [July 12, 2023, 3:32pm UTC](https://community.dynatrace.com/t/error-running-davis-for-workflows/40663/1 "2023-07-12T15:32:32Z")

</div>

I am getting the below error while runnng the&nbsp; **Davis® for workflows**. on one of my environments.

I have followed word to word the steps on the documentation to Predict Disk Capacity and send message to Slack

 ![echwallah_0-1689175881536.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/4/04bedbc5c9f7046a41dcdc865d372bf1ac068f61.png)

Error when triggering dynatrace.davis.workflow.actions:davis-analyze on behalf of user ‘d24382c3-a50f-4d81-8fa4-a77033967342 ([echwallah@ncgafrica.com](mailto:echwallah@ncgafrica.com))::app-engine:functions:run app-settings:objects:write storage:system:read storage:events:read storage:buckets:read state:app-states:read state:user-app-states:read storage:spans:read storage:bizevents:read state:user-app-states:delete state:user-app-states:write app-settings:objects:read storage:logs:read state:app-states:delete davis:analyzers:execute state:app-states:write davis:analyzers:read storage:metrics:read’: 403: {“error”:{“code”:403,“message”:“Forbidden”,“details”:{“errorRef”:“a6b6f165-e933-4253-8076-2917c7fcc971”}}}. Most likely due to lack of permissions granted to automations app or user permissions.

> **[Forecast disk and resource utilization](https://docs.dynatrace.com/docs/dynatrace-intelligence/use-cases/dynatrace-intelligence-for-workflows)**
>
> Automate predictive maintenance of cloud resources with Dynatrace Intelligence within AutomationEngine.

What could be causing this error and how do I resolve it?

---

<div class="post-metadata">

**Author:** ![echwallah](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@echwallah](https://community.dynatrace.com/u/echwallah)\
**Post date:** [July 13, 2023, 6:12am UTC](https://community.dynatrace.com/t/error-running-davis-for-workflows/40663/2 "2023-07-13T06:12:25Z")

</div>

Hi Community, any knowledge on what is causing the attached error and related logs?

Additional information is that I am alredy a user with Account Admin and Deployment admin group priviledge. Within these group priviledges is already attached Policies for Automation Admin and App Admin as shown below

 ![echwallah_0-1689228646375.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/d/0d7f464036b5badc3d6a00343489e2fc98605c6b.png)

 ![echwallah_1-1689228721657.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/2/e295bfbc794ea4f8c7e841cbcd0777b1932f30f9.png)

---

<div class="post-metadata">

**Author:** ![echwallah](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@echwallah](https://community.dynatrace.com/u/echwallah)\
**Post date:** [July 13, 2023, 7:09am UTC](https://community.dynatrace.com/t/error-running-davis-for-workflows/40663/3 "2023-07-13T07:09:41Z")

</div>

Hi Community, I have an update on this after selecting all the Primary and Secondary permissions under Authorization Settings.

I am getting the below error on the Slack send\_message action

 ![echwallah_0-1689232142852.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/5/7568a09e2616154170ac7e96a915b4bcc358e849.png)

Error evaluating custom condition: Undefined variables in ‘{{ result(‘check\_prediction’).violation }}’: violation

---

<div class="post-metadata">

**Author:** ![echwallah](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@echwallah](https://community.dynatrace.com/u/echwallah)\
**Post date:** [July 13, 2023, 1:48pm UTC](https://community.dynatrace.com/t/error-running-davis-for-workflows/40663/4 "2023-07-13T13:48:29Z")

</div>

I have also realized the Dynatrace Davis for Workflows Example use case does not mention to enable&nbsp;app-engine:apps:run&nbsp;- Grants permission to list and run apps and gives basic access to the Launcher. It only mentions&nbsp;app-engine:functions:run

I believe this permission is required to run the Davis for Workflows Analyzer App and also Slack for Workflows. I tried to disable this and the Workflow as per the documentation fails.

> **[Forecast disk and resource utilization](https://docs.dynatrace.com/docs/dynatrace-intelligence/use-cases/dynatrace-intelligence-for-workflows)**
>
> Automate predictive maintenance of cloud resources with Dynatrace Intelligence within AutomationEngine.

---

<div class="post-metadata">

**Author:** ![echwallah](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@echwallah](https://community.dynatrace.com/u/echwallah)\
**Post date:** [July 14, 2023, 8:30pm UTC](https://community.dynatrace.com/t/error-running-davis-for-workflows/40663/5 "2023-07-14T20:30:20Z")

</div>

Hi Community, Thanks to DT Support Engineers, in the jscode for the predict\_capacity&nbsp;line number 35 being the fix in the source code:

Changing that line to&nbsp;return {“violation”: []} fixed this issue.

I think the documentation also needs to be changed accordingly for that use case
