> For the complete documentation index, see [llms.txt](https://docs.gooey.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gooey.ai/ai-agent/copilot/how-to-add-a-daily-export-to-export-your-copilot-data.md).

# Automate Data Export

### Step 1

Head to the Deploy Tab of your AI Agent, click on “View Analytics”

![](/files/ZDhGuO8ypqHfaa2x6y8F)

### Step 2

Once the Dashboard loads, head to the very bottom of the page and open the “Export Settings” tab.

<figure><img src="/files/yMF4nbYTWZNpX2n5N58R" alt=""><figcaption></figcaption></figure>

### Step 3

You can add a code snippet through “Functions”, which can export the data to any external DB.

![](/files/XtNqg1VsFzPbmrRyE42M)

### Step 4

Click the relevant Function from the drop-down and hit “Save”

![](/files/2oj4Ehlgwfoc8lLiOA8E)

![](/files/aOTCcSW2E1wIAt7b6kpo)

{% hint style="info" %}
NOTE: The export will only work in the messages tab. The “Messages” section is in the “Details” section as per the screenshot below.
{% endhint %}

![](/files/VZH2xhIHnVHmuokXUfz8)

{% hint style="success" %}
TIP: You can also trigger a run, whenever you need with the "Run Now" button
{% endhint %}

<figure><img src="/files/XKB7ljPqYqKVgAElr0T8" alt=""><figcaption></figcaption></figure>
