I have successfully set up my AI agent on an AWS EC2 instance, and it is accessible via a web address. The agent functions correctly in the editor. However, when I embed the provided code for the chat widget on a test HTML page, the widget does not display the input text section, which typically happens when it cannot connect to the server or access n8n.
Interestingly, the widget works fine when I use the webhook URL of the workflow hosted locally on my machine.
While testing the webhook using Postman, I initially encountered an “Internal Server Error 500.” Upon checking the execution logs in n8n, the error originated in the “Window Buffer Memory” node, which displayed the message “No Session ID.” To resolve this, I added a session ID variable in Postman, and the agent began responding correctly, with outputs visible in Postman.
Despite the AI agent responding correctly when triggered through Postman, the chat widget is still not functioning properly.
Upon resolving the issue, it was determined that the widget was unable to establish communication with the n8n server due to an incorrect webhook URL. The original URL,
contained a redundant port number (:5678) that was not required, as the n8n server was hosted on the base URL http://thecloud.hopto.org. By modifying the webhook URL to