# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gooey.ai/ai-agent/copilot/how-to-add-a-daily-export-to-export-your-copilot-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
