> For the complete documentation index, see [llms.txt](https://docs.monokot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monokot.io/scripts/expression/import-and-export.md).

# Import & Export

The script manager allows to import / export the structure of groups and expressions from / to a CSV file. The CSV file is formatted as follows:

* Each field is enclosed in double quotes. If the field contains double quotes, then additional double quotes are put around them. For example, the field **"Mud" temperature, °C** should look like this: **"""Mud"" temperature, °C"**
* Fields are separated by commas. For example: **"Group1","RandomExpr","pt=trig1:100;","","DOUBLE","return Math.random();","Random number every 100ms"**
* Each new set of fields begins with a new line
* The first line defines the names of the fields (parameters) and should contain all the parameters used

Description of fields used when exporting and importing expressions:

* **Expression Group:** contains the path to the group where the expression is located. Group names are separated by dots.
* **Expression:** contains the expression name.
* **Triggers:** contains a set of triggers defined in the expression, such as *dt=trig\_b:Examples.TagB.* The format of this field is described below.
* **Modules:** Contains a set of modules imported into the expression, e.g. *module1;module2;md5* (modules are separated by semicolons)..
* **DataType:** contains the type of data to be returned.
* **Code:** contains the expression code.
* **Comment:** contains any custom text.

Triggers are written using the following format: \[TRIGGER\_TYPE]=\[TRIGGER\_NAME]:\[PARAMETER], where

* **TRIGGER\_TYPE:** specifies the trigger type (periodic or data trigger) and takes the value of *pt* or *dt*, respectively.
* **TRIGGER\_NAME:** specifies the name (key) of the trigger.
* **PARAMETER:** depending on the trigger type, defines the following parameter:

1. Update rate set in milliseconds (for the periodic trigger).
2. Path to the tag (for the data trigger).

To define several triggers, you need to specify the required number of strings in \[TRIGGER\_TYPE]=\[TRIGGER\_NAME]:\[PARAMETER] format divided by semicolons.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.monokot.io/scripts/expression/import-and-export.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
