Skip to main content

Hello,

I am using action (AAI Enterprise Knowledge: Ask Question) which answer answer user query from the document. I am passing the document file name in the Document file path properties. When i run the bot i am getting the error please check the screenshot for reference. I have also tried by changing the type still facing the same issue.


Error:

An unexpected error occurred.
JSONObject["sources"] not found.
Please contact system administrator.

Location: APA_DocumentAutomation (line 4)


To continue, edit the bot and fix the error. Then, try again.


If you continue to see this message, please contact your system administrator.

Code: bot.execution.error

 

 

The error JSONObject["sources"] not found indicates that the AAI action isn't receiving the document correctly or in the expected format. Although the document path appears correct (project_id/filename.pdf), the action may be failing to construct the internal JSON properly. Try switching the Document File Path input from "List" to "Variable" and ensure the path string has no extra spaces. Also, confirm that the document is uploaded and accessible in the project’s document storage. If the issue persists, wrap the action in a try/catch block to log the full response and handle missing keys gracefully.


@matthew03 have you been able to try the fixes ​@AbdulBasit suggested?


Reply