# AI Support Chat Bot for mautic, where do I put the script in the code?

**URL:** https://forum.mautic.org/t/ai-support-chat-bot-for-mautic-where-do-i-put-the-script-in-the-code/28347
**Category:** Product Support
**Created:** [June 17, 2023, 8:10am UTC](https://forum.mautic.org/t/ai-support-chat-bot-for-mautic-where-do-i-put-the-script-in-the-code/28347 "2023-06-17T08:10:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)
#### Post date: [June 17, 2023, 8:10am UTC](https://forum.mautic.org/t/ai-support-chat-bot-for-mautic-where-do-i-put-the-script-in-the-code/28347/1 "2023-06-17T08:10:48Z")

</div>

I am playing with AI and want to create a chat bot, train it on all the mautic documentation we have and then have an AI powered support bot inside of Mautic.

I have created the AI chat bot script and I have it working on a wordpress site. Now I want to set it up so it works inside of Mautic.

How / where would I inject the script for the chat bot so it launches inside of Mautic?

---

<div class="post-metadata">

### Author: ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)
#### Post date: [June 18, 2023, 8:18am UTC](https://forum.mautic.org/t/ai-support-chat-bot-for-mautic-where-do-i-put-the-script-in-the-code/28347/2 "2023-06-18T08:18:29Z")

</div>

Hey @robm

Go to /var/www/mautic/app/bundles/CoreBundle/Views/Default/

Add to the head tag in head.html.php

---

<div class="post-metadata">

### Author: ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)
#### Post date: [June 18, 2023, 5:09pm UTC](https://forum.mautic.org/t/ai-support-chat-bot-for-mautic-where-do-i-put-the-script-in-the-code/28347/3 "2023-06-18T17:09:00Z")

</div>

> [@mikew](#):
>
> /var/www/mautic/app/bundles/CoreBundle/Views/Default/

Superb that worked. I now have a ChatGPT-powered chat bot inside the Mautic dashboard. The next step is to train it on the Mautic documents so it’s actually useful.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/f/f2d9ab3ca3b5df6429f0cd1128bf75a454c08696.png)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)
#### Post date: [June 20, 2023, 5:09am UTC](https://forum.mautic.org/t/ai-support-chat-bot-for-mautic-where-do-i-put-the-script-in-the-code/28347/4 "2023-06-20T05:09:53Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
